[yt-users] Streamplot error in annotate_streamlines callback
John ZuHone
jzuhone at gmail.com
Sat Jun 1 15:17:25 PDT 2013
Hi Suoqing,
I think you may need to upgrade matplotlib... Older versions didn't have this functionality. This would be the case if you installed yt a while back.
try:
pip install -U matplotlib
Best,
John
John ZuHone
Laboratory for High-Energy Astrophysics
NASA/Goddard Space Flight Center
8800 Greenbelt Rd., Code 662
Greenbelt, MD 20771
(w) 301-286-2531
(m) 773-758-0172
jzuhone at gmail.com
john.zuhone at nasa.gov
On Jun 1, 2013, at 5:44 PM, Ji Suoqing <jisuoqing at gmail.com> wrote:
> Hi,
>
> Currently I'm using the plot modification callback "annotate_streamlines". However, I got the following error:
>
> Traceback (most recent call last):
> File "magnetic_streamline.py", line 9, in <module>
> slc.annotate_streamlines('magx','magy',factor=10.0,density=6)
> File "/aphelion/jisuoqing/sw/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 101, in newfunc
> args[0]._setup_plots()
> File "/aphelion/jisuoqing/sw/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 935, in _setup_plots
> self.run_callbacks(f)
> File "/aphelion/jisuoqing/sw/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py", line 955, in run_callbacks
> callback(cbw)
> File "/aphelion/jisuoqing/sw/yt-x86_64/src/yt-hg/yt/visualization/plot_modifications.py", line 450, in __call__
> plot._axes.streamplot(X,Y, pixX, pixY, density = self.dens,
> AttributeError: 'Axes' object has no attribute 'streamplot'
>
> Now my yt version code is 2ad91aa91e30. In another desktop I remain another version 04fa9a7d799c, in which the annotate_streamlines callback works for the same data file.
>
> Thanks a lot!
>
> Best wishes,
> Suoqing
> _______________________________________________
> 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/20130601/6ba2e206/attachment.html>
More information about the yt-users
mailing list