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