<div dir="ltr"><div>Dear All,<br><br></div>I am trying to create a 3 by 3 multi plot of densities at different redshifts. But things are failing. But we managed to create a 1 by 3 multi plot with the following code. Can anybody suggest a method to create a 3 by 3 multi plot of density slice.<br>
<div><div><br>from yt.mods import * <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 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 most dense point#dd = pf.h.all_data()<br>
p = pc.add_slice("Temperature", 1, figure = fig, axes = axes[0][m], use_colorbar=True)<br> p.set_log_field(True)<br> p.modify["contour"]("Density", ncont=9, plot_args = {'colors':'w'},clim=(5e-30,5e-25))<br>
pc.set_width(15, 'mpc') # change width of all plots in pc<br> m=m+1<br> <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 clear="all"><br>-- <br><div dir="ltr">Reju Sam John</div>
</div></div></div>