[yt-dev] Issue #764: matplotlib.delaunay deprecated in matplotlib 1.4 (yt_analysis/yt)

Matthew Turk matthewturk at gmail.com
Sat Jan 25 04:03:37 PST 2014


If I remember correctly, we only recently stopped shipping our own copy of
the Delaunay code. I'm not sure what the best solution is.
On Jan 25, 2014 3:30 AM, "Nathan Goldbaum" <issues-reply at bitbucket.org>
wrote:

> New issue 764: matplotlib.delaunay deprecated in matplotlib 1.4
>
> https://bitbucket.org/yt_analysis/yt/issue/764/matplotlibdelaunay-deprecated-in
>
> Nathan Goldbaum:
>
> When running with the current matplotlib github master, importing yt
> produces the following error:
>
> ```
> /Users/goldbaum/Documents/matplotlib/lib/matplotlib/cbook.py:133:
> MatplotlibDeprecationWarning: The matplotlib.delaunay module was deprecated
> in version 1.4. Use matplotlib.tri.Triangulation instead.
> ```
>
> We use matplotlib.delaunay in three places:
>
> ```
> goldbaum at ROUS in ~/Documents/yt-hg on yt-3.0 at tip?
> ☿ grin matplotlib.delaunay
> ./yt/visualization/plot_modifications.py:
>   254 :         from matplotlib.delaunay.triangulate import Triangulation
> as triang
> ./yt/visualization/plot_types.py:
>   539 :         import matplotlib.delaunay.triangulate as de
> ./yt/visualization/plot_window.py:
>    23 : from matplotlib.delaunay.triangulate import Triangulation as triang
> ```
>
> I attempted to patch this, hoping it would be quick, but unfortunately it
> looks like the underlying Triangulation class has a somewhat different API
> now.  For example [this example](
> https://bitbucket.org/yt_analysis/yt/src/84b551a47ac462d646963f0b13e4dd0e85bd9751/yt/visualization/plot_modifications.py?at=yt#cl-311)
> from `plot_modifications.py` no longer works:
>
> ```
> zi = self.triang(x,y).nn_interpolator(z)(xi,yi)
> ```
>
> because nn_interpolator is no longer defined in the new interface.
>
> There's some explanatory background on this in the matplotlib PR that
> deprecates matplotlib.delaunay:
>
> https://github.com/matplotlib/matplotlib/pull/2504
>
> which seems to indicate that nearest-neighbor interpolations has been
> completely removed from matplotlib...
>
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140125/2c298a9a/attachment.htm>


More information about the yt-dev mailing list