[yt-users] producing smooth sliceplots instead of pixelated sliceplot images

Nathan Goldbaum nathan12343 at gmail.com
Tue May 30 07:44:12 PDT 2017


Assuming these are slices through an AMR simulation, you could try manually
plotting the images using matplotlib's imshow command:

https://matplotlib.org/devdocs/api/_as_gen/matplotlib.axes.Axes.imshow.
html#matplotlib-axes-axes-imshow

In particular experimenting with the "interpolation" keyword argument. By
default, yt uses "interpolation='nearest'" (see https://github.com/yt-
project/yt/blob/master/yt/visualization/base_plot_types.py#L218) as this is
the "truest" representation of voxelized data in a pixelized representation.

You can see how different interpolation choices look in this example in the
matplotlib docs:

https://matplotlib.org/examples/images_contours_and_fields/interpolation_methods.html

This choice to use "interpolation='nearest'" in SlicePlot was intentional
and I don't think we want to expose the ability to customize the
interpolation, but of course you can create your own visualizations outside
of SlicePlot using a FixedResolutionBuffer and the manual plotting
interface.

On Tue, May 30, 2017 at 9:34 AM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi Tazkera,
>
> There's not, unfortunately.  We have experimented with this in the
> past, but the results weren't ever satisfactory.  You might try a very
> thin slice with an off-axis projection, which may accomplish the same
> result.
>
> -Matt
>
> On Tue, May 30, 2017 at 12:06 AM, tazkera haque <h.tazkera at gmail.com>
> wrote:
> > Hi People,
> >
> > I was wondering if yt can produce smooth images of zoomed-in sliceplots,
> > where the pixelated AMR grids are not clearly visible. I was interested
> to
> > see the colors get mixed in smoothly (something like
> tetrahedralization), is
> > that possible anyway in yt?
> >
> > Best
> > Tazkera
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170530/4b8beafb/attachment.htm>


More information about the yt-users mailing list