<div dir="ltr">Hi Tazkera,<div><br></div><div>I think you just need to make the 'test_plots' directory. I don't think matplotlib will do that for you.</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 28, 2016 at 5:38 PM, tazkera haque <span dir="ltr"><<a href="mailto:h.tazkera@gmail.com" target="_blank">h.tazkera@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi, <br><br></div>I am trying to create a max_dens and max_temp sweep plot in yt. I am using the following code <br><br>for n in range (0,118):<br><br><br>        fn = flashFolder+'super3d_hdf5_plt_cnt_%04d' % n<br>        pf = yt.load(fn) # load data<br>        #print pf.current_time<br><br>        c = pf.h.find_max('temp')[1]<br>        ax = 0 # take a line cut along the x axis<br><br>        # cutting through the y0,z0 such that we hit the max density<br>        #ray = ds.h.ortho_ray(ax, (c[1], c[2]))<br><br>        # ray with start and end point<br><br>        ray = pf.h.ray([0.,0.,0.],c)<br><br>        # Sort the ray values by 'x' so there are no discontinuities<br>        # in the line plot<br>        srt = np.argsort(ray['x'])<br><br>        plt.subplot(211)<br>        plt.semilogy(np.array(ray['x'][srt]), np.array(ray['dens'][srt]))<br>        plt.ylabel('dens')<br>        plt.subplot(212)<br>        plt.semilogy(np.array(ray['x'][srt]), np.array(ray['temp'][srt]))<br>        plt.xlabel('x')<br>        plt.ylabel('temp')<br><br>        plt.savefig("test_plots/den_temp_xsweep.png")<br><br></div>and getting the the following error:<br><br>IOError: [Errno 2] No such file or directory: 'test_plots/den_temp_xsweep.png'<br><br><br></div>Any suggestion on how to fix this error is highly appreciated.<br><br></div>THanks <br></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>