[yt-users] Plot collections on non-square slices
Devin Silvia
devin.silvia at gmail.com
Tue Jul 24 18:53:00 PDT 2012
Hi Mark,
I've been running non-cubic simulation domains and I've run into this
same issue in the past. Unfortunately, there isn't a simple way
around it (at least not that I've found at the moment). Using an FRB
is an option, or alternatively, you could play with this script that
I've use for some stuff in the past:
http://paste.yt-project.org/show/2570/
The script still makes use of some of the capabilities of
PlotCollection, but ultimately ends up producing and saving the image
using pylab. Right now there is something goofy when you slice
perpendicular to the long axis of a non-cubic domain -- the script
used to work for all axes, but I think something changed in yt along
the way. I'll let you know if I come across the solution to that. I
think it might require a certain pc.set_width call.
Let me know if you have any question about the script, hopefully it's
functionality is pretty straight forward.
-Devin
On Tue, Jul 24, 2012 at 5:33 PM, Mark Krumholz <krumholz at ucolick.org> wrote:
>
> On Jul 24, 2012, at 4:29 PM, Nathan Goldbaum wrote:
>
>> Hi Mark,
>>
>> You can manually specify the size of the figure that will be created by
>> setting the fig_size keyword. For example:
>>
>> pf = load(fn)
>>
>> pc = PlotCollection(pf)
>>
>> fig_size = [4, 3] # the figure size in inches
>>
>> pc.add_slice('Density',0,fig_size = fig_size)
>>
>> pc.save() # saves a slice of Density that is 4 x 3 inches.
>>
>> Hope that was helpful.
>>
>> -Nathan
>
>
>
> I just tried it, and I'm afraid this doesn't work. Setting the figure size
> to, say [1,4] (the aspect ratio of my figure) just results in a squashed
> version of what I got before. The whitespace is still there, and the image
> of the data is now artificially compressed.
>
>
> --
> Mark Krumholz
> krumholz at ucolick.org
>
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
--
"I'm here to fight for truth, and justice, and the American way."
More information about the yt-users
mailing list