[yt-users] Problem making Plots

Nathan Goldbaum nathan12343 at gmail.com
Fri Feb 19 07:31:23 PST 2016


I think yt 2.6.1 wasn't able to create a subdirectory if it didn't already
exist. Does the 'plots' directory exist?

On Thu, Feb 18, 2016 at 11:31 PM, Yuxiao Dai <yuxiao.dai at nyu.edu> wrote:

> Hi all,
>
>
> I tried to get some plots using a python code but got this error message.
>
> =======================
>
> Traceback (most recent call last):
>
>   File "ytplots_BMag_plot_dai.py", line 58, in <module>
>
>     *pcb.save('plots/Bullet_BMag_'+str(i))*
>
>   File
> "/home/yd742/software/withpysci/yt-x86_64/src/yt-hg/yt/visualization/plot_collection.py",
> line 173, in save
>
>     override=override, force_save=force_save))
>
>   File
> "/home/yd742/software/withpysci/yt-x86_64/src/yt-hg/yt/visualization/plot_types.py",
> line 112, in save_image
>
>     only_on_root(canvas.print_figure, fn)
>
>   File "/home/yd742/software/withpysci/yt-x86_64/src/yt-hg/yt/funcs.py",
> line 368, in only_on_root
>
>     return func(*args,**kwargs)
>
>   File
> "/home/yd742/software/withpysci/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.3.0-py2.7-linux-x86_64.egg/matplotlib/backend_bases.py",
> line 2220, in print_figure
>
>     **kwargs)
>
>   File
> "/home/yd742/software/withpysci/yt-x86_64/lib/python2.7/site-packages/matplotlib-1.3.0-py2.7-linux-x86_64.egg/matplotlib/backends/backend_agg.py",
> line 510, in print_png
>
>     filename_or_obj = open(filename_or_obj, 'wb')
>
> IOError: [Errno 2] No such file or directory:
> 'plots/Bullet_BMag_0_Profile1D_0_RadiusMpc_BMag.png'
>
> =======================
>
> I'm using yt
>
> Version = 2.6.1
>
> Changeset = c994959ed3be
>
> =======================
>
> I would very much appreciate it if anyone could help me on this.
>
>
> Thank you very much.
>
>
> Regards,
>
> Yuxiao
>
> _______________________________________________
> 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/20160219/829c47e9/attachment.htm>


More information about the yt-users mailing list