Skip to content

Commit d46aefb

Browse files
committedOct 9, 2017
Fix poorly done deprecations in image.py.
1 parent 969de0a commit d46aefb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎lib/matplotlib/backends/qt_editor/figureoptions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import re
1717

1818
import matplotlib
19-
from matplotlib import cm, markers, colors as mcolors
19+
from matplotlib import cm, colors as mcolors, markers, image as mimage
2020
import matplotlib.backends.qt_editor.formlayout as formlayout
2121
from matplotlib.backends.qt_compat import QtGui
2222

@@ -165,7 +165,7 @@ def prepare_data(d, init):
165165
('Max. value', high),
166166
('Interpolation',
167167
[image.get_interpolation()]
168-
+ [(name, name) for name in sorted(image.iterpnames)])]
168+
+ [(name, name) for name in sorted(mimage.interpolations_names)])]
169169
images.append([imagedata, label, ""])
170170
# Is there an image displayed?
171171
has_image = bool(images)

‎lib/matplotlib/image.py

+3
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,17 @@ def _rgb_to_rgba(A):
180180
class _ImageBase(martist.Artist, cm.ScalarMappable):
181181
zorder = 0
182182

183+
@property
183184
@cbook.deprecated("2.1")
184185
def _interpd(self):
185186
return _interpd_
186187

188+
@property
187189
@cbook.deprecated("2.1")
188190
def _interpdr(self):
189191
return {v: k for k, v in six.iteritems(_interpd_)}
190192

193+
@property
191194
@cbook.deprecated("2.1")
192195
def iterpnames(self):
193196
return interpolations_names

0 commit comments

Comments
 (0)