[yt-users] Nice bugfix for yt in matplotlib 1.5.3
Nathan Goldbaum
nathan12343 at gmail.com
Mon Sep 12 13:14:07 PDT 2016
Hi all,
Matplotlib 1.5.3 was released recently and it contains a nice yt-specific
bugfix that I added to matplotlib that should make all of our lives easier.
As soon as you update matplotlib, you'll be able to make an imshow plot of
a 2D YTArray (e.g. one produced by FixedResolutionBuffer) without stripping
the array's units first.
In other words:
import yt
from matplotlib import pyplot as plt
ds = yt.load(...)
plot = yt.SlicePlot(ds, 2, 'density')
density_image = plot.frb['density']
plt.imshow(density_image)
plt.show()
will actually create an imshow plot instead of erroring out as would have
happened in earlier versions of matplotlib.
For more details about this, see:
https://github.com/matplotlib/matplotlib/pull/6622
-Nathan Goldbaum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160912/75743ba9/attachment.htm>
More information about the yt-users
mailing list