You need to do two things to adjust the plot resolution.

First, to adjust the resolution of the image array that yt is plotting (i.e. if 800x800 for each subpanel is too low), use the set_buff_size() member function of the yt plotting class.

Next, in order to actually save it at high resolution, you will need to specify the dpi when you call savefig. Matplotlib assumes resolution-independent scaling up until the point when the plot is actually displayed or saved to disk.

Note that the dpi (dots per inch) interacts with the size of the plotting window (specified in inches). You can fully control the image resolution through a combination of calling the set_buff_size() and set_figure_size() functions that are attached to yt plotting classes.

I've made a couple minor modifications to the multiplot_2x2_time_series.py script to produce a higher resolution version. I also switched out the dataset since I don't have a copy of Enzo_64 on my laptop.  Here it is:

http://paste.yt-project.org/show/5769/

This produces an image with a resolution of 3255 x 2760, whereas if I don't specify the dpi in the savefig call, the resolution is 1085 x 920.

Hope that's helpful,

Nathan



On Sat, Aug 1, 2015 at 7:57 AM, Shankar Agarwal <agarwalshankar@gmail.com> wrote:
Hi,

When making a typical 1x1 plot, I see that the final image has 800x800 pixels.

I then used the following script to make a 2x2 multipanel plot, with each panel showing the projected density:
http://yt-project.org/doc/cookbook/complex_plots.html#time-series-multipanel

However, I see that each of the four panels is not 800x800. It is about 388x388. As such, some of the details in each panel is lost (which I can see if I plot the four panels separately on 1x1 plots).

Is there an easy way to tell the above script that each panel be 800x800 pixel? By the way, I see there is a statement
Npixels = 512
in http://yt-project.org/doc/cookbook/complex_plots.html#off-axis-projection-an-alternate-method

Cheers,
Shankar


_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org