<div dir="ltr">Dear Kacper,<div><br></div><div>but this is giving the following error</div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "multi_plot_temp_reju.py", line 19, in <module></div>
<div> pf.field_info["Temperature"].take_log = False</div><div> File "/data1/pdf/csurajit/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 131, in __missing__</div><div> return self.fallback[key]</div>
<div> File "/data1/pdf/csurajit/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 131, in __missing__</div><div> return self.fallback[key]</div><div> File "/data1/pdf/csurajit/yt-x86_64/src/yt-hg/yt/data_objects/field_info_container.py", line 130, in __missing__</div>
<div> raise KeyError("No field named %s" % key)</div><div>KeyError: 'No field named Temperature'</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Aug 10, 2013 at 10:55 AM, Kacper Kowalik <span dir="ltr"><<a href="mailto:xarthisius.kk@gmail.com" target="_blank">xarthisius.kk@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 class="HOEnZb"><div class="h5">On 08/08/2013 10:05 AM, Reju Sam John wrote:<br>
> Dear All,<br>
> I am trying to plot a multi plot of temperatures at different red-shifts<br>
> with following script.<br>
><br>
> from yt.mods import * # set up our namespace<br>
> import matplotlib.colorbar as cb<br>
><br>
> fig, axes, colorbars = get_multi_plot( 3, 1, colorbar='vertical', bw = 4)<br>
><br>
> file1="/app/run/csarkar/surajit/simulation_shock/simulation5/RD00"<br>
> file2="/RedshiftOutput00"<br>
> list = [11,13,22]<br>
> m=0<br>
> #for kk in range(20,37):<br>
> for kk in list:<br>
> fn_i=str(kk)<br>
> fn=file1+fn_i+file2+fn_i # parameter file to load<br>
> print fn<br>
> pf = load(fn) # load data<br>
> pc = PlotCollection(pf, center=[0.5,0.5,0.5]) # defaults to center at<br>
> most dense point#dd = pf.h.all_data()<br>
> p = pc.add_slice("Temperature", 1, figure = fig, axes = axes[0][m],<br>
> use_colorbar=False)<br>
> p.set_log_field(False)<br>
> p.set_zlim(1e4,5e7)<br>
> #p.set_cmap("jet")# a different colormap<br>
> p.modify["contour"]("Density", ncont=9, plot_args =<br>
> {'colors':'w'},clim=(5e-30,5e-25))<br>
> #p.modify["contour"]("Temperature", ncont=10, plot_args =<br>
> {'colors':'k'},clim=(3e7,1e8))<br>
> pc.set_width(15, 'mpc') # change width of all plots in pc<br>
> m=m+1<br>
> #pc.save("%s_p.png" % pf) # save all plots<br>
> for p, cax in zip(pc.plots, colorbars):<br>
> cbar = cb.Colorbar(cax, p.image, orientation='vertical')<br>
> p.colorbar = cbar<br>
> p._autoset_label()<br>
> fig.savefig("Temperature_at_rd00_11,13,22" % pf)<br>
><br>
> The problem is that I am getting the temperature in log scale, even-though<br>
> I used p.set_log_field(False)<br>
> in my script.<br>
<br>
</div></div>Hi,<br>
I'm not exactly sure why set_log_field doesn't work for you, but you<br>
could try to call:<br>
<br>
pf.field_info["Temperature"].take_log = False<br>
<br>
after loading a file.<br>
Cheers,<br>
Kacper<br>
<br>
<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><br clear="all"><div><br></div>-- <br><div dir="ltr">Reju Sam John</div>
</div>