Hi all, I have a pretty dumb question. I have data from which I would like to take a slice with a resolution of one cell per pixel. How can I do that ? Thanks a lot, JC
Hi JC,
If you want to use the PlotCollection, you can control the image size with
the fig_size keyword given to pc.add_slice. The dpi of images written out
is 100, so you just need to give the right values with fig_size to get what
you're looking for. A couple things to remember. The colorbar takes 25% of
the width of the image, so you need to adjust the width for that. Also, you
need to give the value as a tuple, so fig_size=(10, 8), for example. You
can always do:
help(pc.add_slice)
to get more information on everything you can do with that function, or any
for that matter.
Britton
On Mon, Sep 26, 2011 at 5:57 PM, Jean-Claude Passy
Hi all,
I have a pretty dumb question. I have data from which I would like to take a slice with a resolution of one cell per pixel. How can I do that ?
Thanks a lot,
JC ______________________________**_________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/**listinfo.cgi/yt-users-**spacepope.orghttp://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
You can also use FixedResolutionBuffer, a yt tool that gives you a
buffer of fixed resolution, and imshow, a matplotlib tool that makes
images from arrays. I've done this successfully in the past.
d.
On Mon, Sep 26, 2011 at 9:18 PM, Britton Smith
Hi JC,
If you want to use the PlotCollection, you can control the image size with the fig_size keyword given to pc.add_slice. The dpi of images written out is 100, so you just need to give the right values with fig_size to get what you're looking for. A couple things to remember. The colorbar takes 25% of the width of the image, so you need to adjust the width for that. Also, you need to give the value as a tuple, so fig_size=(10, 8), for example. You can always do: help(pc.add_slice) to get more information on everything you can do with that function, or any for that matter.
Britton
On Mon, Sep 26, 2011 at 5:57 PM, Jean-Claude Passy
wrote: Hi all,
I have a pretty dumb question. I have data from which I would like to take a slice with a resolution of one cell per pixel. How can I do that ?
Thanks a lot,
JC _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Sent from my computer.
Thanks David and Britton, FixedResolutionBuffer worked quite well. Cheers, JC On 27/09/11 10:11, David Collins wrote:
You can also use FixedResolutionBuffer, a yt tool that gives you a buffer of fixed resolution, and imshow, a matplotlib tool that makes images from arrays. I've done this successfully in the past.
d.
On Mon, Sep 26, 2011 at 9:18 PM, Britton Smith
wrote: Hi JC,
If you want to use the PlotCollection, you can control the image size with the fig_size keyword given to pc.add_slice. The dpi of images written out is 100, so you just need to give the right values with fig_size to get what you're looking for. A couple things to remember. The colorbar takes 25% of the width of the image, so you need to adjust the width for that. Also, you need to give the value as a tuple, so fig_size=(10, 8), for example. You can always do: help(pc.add_slice) to get more information on everything you can do with that function, or any for that matter.
Britton
On Mon, Sep 26, 2011 at 5:57 PM, Jean-Claude Passy
wrote: Hi all,
I have a pretty dumb question. I have data from which I would like to take a slice with a resolution of one cell per pixel. How can I do that ?
Thanks a lot,
JC _______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (3)
-
Britton Smith
-
David Collins
-
Jean-Claude Passy