Hi Andrea
Data inputs in plot must be lists or arrays. So
instead of :
plot( x[i] , y[i] )
you must write
plot( [x[i]] , [y[i]] )
Kristen
--- and...@ti... wrote:
> Hello NG,
>
> I am trying to plot a series of point (in a
> wxPython window). Everything
> works if I plot all the points together, as:
>
> myreference = plot(x, y, 'ko')
>
> But I would like to plot 1 point at a time, and to
> keep a "plot reference"
> of every point, because I will have to be able to
> interact with every single
> point (and not with all of them) separately, using
> the mpl_connect functions.
> If I try to plot a single point, matplotlib/pylab
> returns me an error like:
>
> File "D:\MyProjects\globall\SummaryPanel.py", line
> 169, in CreateWellMap
> mp = axdata.plot(xc[cc], yc[cc], "ko")
> File
> "C:\Python23\Lib\site-packages\matplotlib\axes.py",
> line 2324, in
> plot
> for line in self._get_lines(*args, **kwargs):
> File
> "C:\Python23\Lib\site-packages\matplotlib\axes.py",
> line 276, in
> _grab_ne
> xt_args
> yield self._plot_3_args(remaining, **kwargs)
> File
> "C:\Python23\Lib\site-packages\matplotlib\axes.py",
> line 238, in
> _plot_3_
> args
> assert(iterable(x))
> AssertionError
>
>
> Does anyone have a suggestion? Thank you very much.
>
> Andrea.
>
>
>
>
>
-------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT
> Products from real users.
> Discover which products truly live up to the hype.
> Start reading now.
> http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
>
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
|