[yt-users] Error with annotate_marker: Unknown property
Nathan Goldbaum
nathan12343 at gmail.com
Thu Aug 1 16:35:55 PDT 2013
Hi Chao,
For that callback, you're only allowed to specify keyword arguments
accepted by matplotlib.axes.Axes.scatter:
http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.scatter
or Collection properties:
http://matplotlib.org/api/collections_api.html#matplotlib.collections.Collection
I'd have to look closer to figure out which keyword corresponds to what
you're looking for, but hopefully that leaves you enough information to
figure out how to do what you're trying to do.
-Nathan
On Thu, Aug 1, 2013 at 3:53 PM, Chao Shi <shichao116 at gmail.com> wrote:
> Hi all,
>
> I'm trying to mark some positions with circle on slice and projection
> plot. But it can't recognize arguments used for specifying the property of
> the marker. For example:
>
>
> >>> p = SlicePlot(pf,'x','Density')
>
> >>> p.annotate_marker([0.5]*3,marker='o', plot_args={'color': 'red',
> 'mew': 5})
>
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/home/cshi31/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
> line 100, in newfunc
> args[0]._setup_plots()
> File "/home/cshi31/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
> line 886, in _setup_plots
> self.run_callbacks(f)
> File "/home/cshi31/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
> line 896, in run_callbacks
> callback(cbw)
> File
> "/home/cshi31/yt-x86_64/src/yt-hg/yt/visualization/plot_modifications.py",
> line 777, in __call__
> plot._axes.scatter(x,y, marker = self.marker, **self.plot_args)
> File
> "/home/cshi31/yt-x86_64/lib/python2.7/site-packages/matplotlib/axes.py",
> line 6123, in scatter
> collection.update(kwargs)
> File
> "/home/cshi31/yt-x86_64/lib/python2.7/site-packages/matplotlib/artist.py",
> line 670, in update
> raise AttributeError('Unknown property %s' % k)
> AttributeError: Unknown property mew
>
> mew is an alias for markeredgewidth. I also tried with 'markeredgewidth'
> but it gave the same error.
>
> Besides, 'mec', 'ms' also can't be recognized. Only 'color' works.
>
> Does anyone have a clue about this?
>
> Thanks very much.
>
> Chao
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130801/fb8c7ad5/attachment.html>
More information about the yt-users
mailing list