Hi Stephanie,

When you call plot.save(), you need to pass something like this:

plot6z.save('JO201scc_76kpc_'+loop[i]+'t'+times[i], mpl_kwargs={'dpi': 300})

Or whichever dpi you'd like to use. In addition, you probably also want to call plot.set_figure_size(), which accepts a size in inches for the matplotlib figure used for the plot. The actual number of pixels in the resulting png image saved by matplotlib is dpi*figure_size.

Also if you *really* want this to be exact, you probably should disable the colorbar and the axes, so that the resulting figure contains *just* the image.

On Wed, Aug 29, 2018 at 4:08 PM Stephanie Tonnesen <stonnes@gmail.com> wrote:
Hi yt-users!

So I have a question about set_buff_size.  I would like my pixels to be the same size as my more refined cell in a projectionplot, so have a couple lines of code like this:


When I take a look at the png file that is made, there are 800 pixels across instead of the 2000 that I expect.  I just checked the docs here:  http://yt-project.org/doc/visualizing/plots.html

and based on the SlicePlot example I feel like it should work!  Then again, it looks like in the example the number of pixels also doesn't change?

I would appreciate any/all advice!



Dr. Stephanie Tonnesen
Associate Research Scientist
CCA, Flatiron Institute
New York, NY

yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org