[yt-users] yt-users Digest, Vol 35, Issue 2

Wolfram Schmidt schmidt at astro.physik.uni-goettingen.de
Tue Jan 4 04:08:19 PST 2011


On 01/03/2011 07:33 PM, yt-users-request at lists.spacepope.org wrote:
Hi John,

thanks for your suggestions! Unfortunately, the first option doesn't
seem to work for multi plots, and I am not sure how option 2 can be
carried over to multi plots.

Cheers,
Wolfram

> ------------------------------
> 
> Message: 2
> Date: Mon, 3 Jan 2011 10:22:21 -0500
> From: John Wise <jwise at astro.princeton.edu>
> To: Discussion of the yt analysis package
> 	<yt-users at lists.spacepope.org>
> Subject: Re: [yt-users] pixel resolution of plots
> Message-ID: <499D34F2-6DD9-4D44-B89E-504CE732AA2A at astro.princeton.edu>
> Content-Type: text/plain; charset=us-ascii
> 
> Hi Wolfram,
> 
> You can change the resolution of the plots by specifying the figure size when making the plots in a plot collection.
> 
> pc = PlotCollection(pf, center=[0.5]*3)                                             
> pc.add_projection('Temperature',0,'Density',fig_size=(15,12))                       
> pc.save()                                                                           
> 
> This will create an image with a size of 15x12 inches.  On my system, the DPI is 100, so the resolution is 1500x1200.  I'm not sure where to change the DPI, but if you're only concerned with resolution, this will work.
> 
> Also you can use fixed resolution buffers, where you specify the resolution as the 3rd argument.  Then you can create a PNG with the built-in PNG writer (no colorbars) or use the plot collection framework.  Here's an example
> 
> proj = pf.h.proj(0, "Temperature", "Density")                                        
> frb = FixedResolutionBuffer(proj, (0,1,0,1), (1600,1600))                            
> iw.write_image(frb["Temperature"], "temp-projection.png")                            
> 
> where the image is 1600x1600 and plots a density-weighted temperature projection from (0,0) to (1,1).
> 
> Cheers,
> John
> 
> On 3 Jan 2011, at 09:29, Wolfram Schmidt wrote:
> 
>> is it possible to change the pixel resolution of the plots produced by
>> yt? For printed documents, the default resolution appears to be rather low.
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> 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 35, Issue 2
> ***************************************
> 




More information about the yt-users mailing list