<div dir="ltr">Hi Kearn,<div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 11, 2013 at 10:18 AM,  <span dir="ltr"><<a href="mailto:k.grisdale@surrey.ac.uk" target="_blank">k.grisdale@surrey.ac.uk</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word">
Hi everyone
<div><br>
</div>
<div>I am trying to make a multi plot using data from Ramses. I have outputs from Ramses at 6 different times and I want to make projections at each time and place than in a multi plot to show evolution of the system. However when the code that I have written
 gives the results below. </div>
<div><br>
</div>
<div><br>
</div>
<div><img height="211" width="320" src="cid:F88B06FF-D341-4589-9FD2-C8BEF5BE7CE8@surrey.ac.uk"></div>
<div><br>
</div>
<div><br>
</div>
<div>Can anyone offer any suggestions as to wear my code is going wrong?</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Kearn</div>
<div><br>
</div>
<div>The code I’m using ( the for dax lines have been commented out because every time they are included I get the error at the bottom) </div>
<div><br>
</div>
<div>
<div>from yt.mods import * # set up our namespace</div>
<div>import matplotlib.colorbar as cb</div>
<div>from matplotlib.colors import LogNorm</div>
<div><br>
</div>
<div>p1 = load("output_00001/info_00001.txt")</div>
<div>p2 = load("output_00002/info_00002.txt")</div>
<div>p3 = load("output_00003/info_00003.txt")</div>
<div>p4 = load("output_00004/info_00004.txt")</div>
<div>p5 = load("output_00005/info_00005.txt")</div>
<div>p6 = load("output_00006/info_00006.txt")</div>
<div><br>
</div>
<div>cen = [0,0,0]</div>
<div>orient = 'vertical'</div>
<div><br>
</div>
<div>fig, axes, colorbars = get_multi_plot(3, 2, colorbar=orient, bw = 4)</div>
<div>proj1 = p1.h.proj(2, "Density", center=cen)</div>
<div>proj2 = p2.h.proj(2, "Density", center=cen)</div>
<div>proj3 = p3.h.proj(2, "Density", center=cen)</div>
<div>proj4 = p4.h.proj(2, "Density", center=cen)</div>
<div>proj5 = p5.h.proj(2, "Density", center=cen)</div>
<div>proj6 = p6.h.proj(2, "Density", center=cen)</div>
<div><br>
</div>
<div>proj1_frb = proj1.to_frb((0.7,"cm"),512) </div>
<div>proj2_frb = proj2.to_frb((0.7,"cm"),512) </div>
<div>proj3_frb = proj3.to_frb((0.7,"cm"),512) </div>
<div>proj4_frb = proj4.to_frb((0.7,"cm"),512) </div>
<div>proj5_frb = proj5.to_frb((0.7,"cm"),512) </div>
<div>proj6_frb = proj6.to_frb((0.7,"cm"),512) </div>
<div><br>
</div>
<div>dens_axes = [axes[0][0], axes[1][0]]</div>
<div><br>
</div>
<div>#for dax in zip(dens_axes) :</div></div></div></blockquote><div><br></div><div>I'm not sure what you're doing here -- this will yield:</div><div><br></div><div>[(axes[0][0],), (axes[1][0],)]</div><div><br></div>

<div>So you'll be getting back a tuple of length one inside the loop.  You should be able to do dax[0]?  But I'm not sure you need to zip in the first place, either.</div><div><br></div><div>-Matt</div><div> </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>
<div><br>
</div>
<div>#    dax.xaxis.set_visible(False)</div>
<div>#    dax.yaxis.set_visible(False)</div>
<div><br>
</div>
<div>plots = [dens_axes[0].imshow(proj1_frb["Density"],origin ='lower'), </div>
<div>         dens_axes[0].imshow(proj2_frb["Density"],origin ='lower'),</div>
<div>         dens_axes[0].imshow(proj3_frb["Density"],origin ='lower'),</div>
<div>         dens_axes[0].imshow(proj4_frb["Density"],origin ='lower'),</div>
<div>         dens_axes[0].imshow(proj5_frb["Density"],origin ='lower'),</div>
<div>         dens_axes[0].imshow(proj6_frb["Density"],origin ='lower')]</div>
<div><br>
</div>
<div>plots[0].set_clim((0.0,0.34))</div>
<div>plots[0].set_cmap("YlOrRd")</div>
<div>plots[1].set_clim((0.0,0.345))</div>
<div>plots[1].set_cmap("YlOrRd")</div>
<div>plots[2].set_clim((0.0,0.34))</div>
<div>plots[2].set_cmap("YlOrRd")</div>
<div>plots[3].set_clim((0.0,0.34))</div>
<div>plots[3].set_cmap("YlOrRd")</div>
<div>plots[4].set_clim((0.0,0.34))</div>
<div>plots[4].set_cmap("YlOrRd")</div>
<div>plots[5].set_clim((0.0,0.34))</div>
<div>plots[5].set_cmap("YlOrRd")</div>
<div><br>
</div>
<div>fig.savefig("test”)</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>error: </div>
<div><br>
</div>
<div>Traceback (most recent call last):</div>
<div>  File "plotterm2.py", line 34, in <module></div>
<div>    dax.xaxis.set_visible(False)</div>
<div>AttributeError: 'tuple' object has no attribute 'xaxis'</div>
</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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div></div>