[yt-users] 3 by 3 multi plot

Matthew Turk matthewturk at gmail.com
Wed Nov 20 12:33:58 PST 2013


Hi Reju,

If you change axes[0][m] to use axes[1][m] (for instance) it will go
to the second line.  The first index refers to the column (or row, I
can't remember off hand.)

-Matt

On Tue, Nov 19, 2013 at 9:18 AM, Reju Sam John <rejusamjohn at gmail.com> wrote:
> Dear All,
>
> 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.
>
> from yt.mods import *
> import matplotlib.colorbar as cb
>
> fig, axes, colorbars = get_multi_plot( 3, 1, colorbar='vertical', bw = 4)
>
> file1="/app/run/csarkar/surajit/simulation_shock/simulation5/RD00"
> file2="/RedshiftOutput00"
> list = [11,13,22]
> m=0
> for kk in list:
>     fn_i=str(kk)
>     fn=file1+fn_i+file2+fn_i # parameter file to load
>     print fn
>     pf = load(fn) # load data
>     pc = PlotCollection(pf, center=[0.5,0.5,0.5]) # defaults to center at
> most dense point#dd = pf.h.all_data()
>     p = pc.add_slice("Temperature", 1, figure = fig, axes = axes[0][m],
> use_colorbar=True)
>     p.set_log_field(True)
>     p.modify["contour"]("Density", ncont=9, plot_args =
> {'colors':'w'},clim=(5e-30,5e-25))
>     pc.set_width(15, 'mpc') # change width of all plots in pc
>     m=m+1
>
>     for p, cax in zip(pc.plots, colorbars):
>         cbar = cb.Colorbar(cax, p.image, orientation='vertical')
>         p.colorbar = cbar
>         p._autoset_label()
>         fig.savefig("Temperature_at_rd00_11,13,22" % pf)
>
>
> --
> Reju Sam John
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list