[yt-users] yt-users Digest, Vol 91, Issue 18

Guido granda muñoz guidogranda at gmail.com
Mon Sep 14 14:33:47 PDT 2015


Hello Nathan,

I updated yt an the problem was solved, thank you.

Regards,


2015-09-13 14:56 GMT-03:00 <yt-users-request at lists.spacepope.org>:

> Send yt-users mailing list submissions to
>         yt-users at lists.spacepope.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> or, via email, send a message with subject or body 'help' to
>         yt-users-request at lists.spacepope.org
>
> You can reach the person managing the list at
>         yt-users-owner at lists.spacepope.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of yt-users digest..."
>
>
> Today's Topics:
>
>    1. Re: multi projection plots with title and annotations
>       (Nathan Goldbaum)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 12 Sep 2015 18:46:25 -0500
> From: Nathan Goldbaum <nathan12343 at gmail.com>
> To: Discussion of the yt analysis package
>         <yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] multi projection plots with title and
>         annotations
> Message-ID:
>         <CAJXewOni8_yTvGo9e+PezJfvQqfO5EcHdpMKkcw+prTX3uSw=
> w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Just in case you haven't updated in a while, I would do so since there was
> a fix included in yt 3.2.1 that might solve your problem.
>
>
> https://bitbucket.org/yt_analysis/yt/pull-requests/1698/ensure-the-frb-is-valid-before-executing/diff
>
> If you're already on yt 3.2.1 I'll take a closer look at this soon.
>
> Nathan
>
> On Saturday, September 12, 2015, Guido granda mu?oz <guidogranda at gmail.com
> >
> wrote:
>
> > Hello there,
> >
> > I'm trying to do a multipanel plot of projected density with titles in
> > each axis and annotations but I couldn't figure out how to do it, could
> you
> > please help me.
> >
> > I'm using AxesGrid as in your example(
> >
> http://yt-project.org/doc/cookbook/complex_plots.html#multipanel-with-axes-labels
> )
> > however
> > something is wrong. I'm sending my output image as a attached file.
> >
> > My code is the following:
> >
> >
> >
> >
> > import yt
> > import matplotlib.pyplot as plt
> > import sys
> > import numpy as np
> > from mpl_toolkits.axes_grid1 import AxesGrid
> > import matplotlib.colorbar as cb
> > from matplotlib.colors import LogNorm
> >
> > data=[]
> > data.append(sys.argv[1])
> > data.append(sys.argv[2])
> > data.append(sys.argv[3])
> > data.append(sys.argv[4])
> >
> > pf1=yt.load(data[0])
> > pf2=yt.load(data[1])
> > pf3=yt.load(data[2])
> > pf4=yt.load(data[3])
> >
> > pfs=[]
> > pfs.append(pf1)
> > pfs.append(pf2)
> > pfs.append(pf3)
> > pfs.append(pf4)
> >
> >
> > fig=plt.figure()
> > grid = AxesGrid(fig, (0.075,0.075,0.85,0.85),nrows_ncols = (2,
> 2),axes_pad
> > = 1.0,label_mode = "all",share_all =
> >
> True,cbar_location="right",cbar_mode="single",cbar_size="5%",cbar_pad="5%",cbar_set_cax=True)
> >
> >
> > axe=['y','y','y','y']
> > field=['density','density','density','density']
> > colors=[]
> > title=['100 Mpc/h box size', '75 Mpc/h box size','100 Mpc/h box size','50
> > Mpc/h box size']
> >
> > for i in range(len(data)):
> >     p
> > =yt.ProjectionPlot(pfs[i],axe[i],field[i],center='c',width=(25,'Mpc/h'))
> >         p.set_zlim('density',4.4601764879407653e-5,5.0e-2)
> >         p.annotate_timestamp(corner='upper_left',
> > redshift=True,draw_inset_box=True)
> >         p.annotate_title(title[i])
> >         plot=p.plots[field]
> >         plot.figure=fig
> >         plot.axes=grid[i].axes
> >         plot.cax=grid.cbar_axes[i]
> >         p._setup_plots()
> >
> >
> > fig.savefig('plot1_f.png',pdi=300)
> >
> >
> >
> >
> > Kind regards,
> > --
> > Guido
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150912/737c1d25/attachment.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
> ------------------------------
>
> End of yt-users Digest, Vol 91, Issue 18
> ****************************************
>



-- 
Guido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150914/09226c10/attachment.htm>


More information about the yt-users mailing list