[yt-users] Multiplot Phaseplot
Charles Hansen
chansen at astro.berkeley.edu
Tue Jun 7 16:08:06 PDT 2011
It is kinda tricky. With everything except for phaseplot, you can use
something like...
(using matplotlib)
pc = PlotCollection(....)
subplot(211)
fig1 = gcf()
axis1 = gca()
p = pc.add_slice(...., figure=fig1, axes=axis1, use_colorbar=False)
suplot(212)
fig2 = gcf()
axis2 = gca()
p = pc.add_slice(...., figure=fig2, axes=axis2, use_colorbar=False)
With phaseplot, it just doesn't work. I do not know why.
I eventually just saved each figure individual and pasted them together
using imagemagick convert. For the sake of argument suppose you want a
'quad chart' arrangement of four figures named as 1.png through 4.png.
Use convert to stick them together:
convert +append 1.png 2.png row1.png
convert +append 3.png 4.png row2.png
convert -append row1.png row2.png final_image.png
I'd be happy to know if there is a better way.
Charles
On 6/7/2011 3:52 PM, Christine Simpson wrote:
> Hi Matt,
>
> Do you mind if I resurrect this discussion? I am trying to do something
> similar, create a multiplot phase plot. Could you say a bit more about
> how to feed the yt phase plots to subplot()?
>
> Thanks
> Christine
>
> On Fri, 2011-04-22 at 21:44 -0400, Matthew Turk wrote:
>> I have replicated the error using the multi_plot.py script. I was
>> able to get rid of it by calling _redraw_image() on each of the plot
>> objects... but in general it's a bit ugly and I'm not sure that I'm
>> entirely happy with how it works for phase plots. You might be better
>> suited to setting up subplot() calls directly and feeding those axes;
>> multi_plot is mostly useful when you have multiple synchronized
>> colorbars, which is tricky with phase plots. Unfortunately I don't
>> think I can backport something to make it easier to the old SVN
>> version at this time.
>>
>> Best,
>>
>> Matt
>>
>>
> _______________________________________________
> 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