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

Matthew Turk matthewturk at gmail.com
Tue May 30 07:47:20 PDT 2017


On Tue, May 30, 2017 at 9:44 AM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> 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.

One thing to note that the interpolation matplotlib will apply is not
based on the AMR cells, but the regularization of those cells to a
fixed buffer.  So you'll still see the voxels, but they'll be fuzzy at
the very edges.

>
> 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
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>


More information about the yt-users mailing list