Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a70a835

Browse files
committed
Fix method name and update CHANGELOG/whats_new.
1 parent 52a5906 commit a70a835

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-05-14 Added Axes.add_image() as the standard way to add AxesImage
2+
instances to Axes. This improves the consistency with
3+
add_artist(), add_collection(), add_container(), add_line(),
4+
add_patch(), and add_table().
5+
16
2014-05-02 Added colorblind-friendly colormap, named 'Wistia'.
27

38
2014-04-27 Improved input clean up in Axes.{h|v}lines

doc/users/whats_new.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ Larry Bradley fixed the :func:`~matplotlib.pyplot.errorbar` method such
166166
that the upper and lower limits (*lolims*, *uplims*, *xlolims*,
167167
*xuplims*) now point in the correct direction.
168168

169+
More consistent add-object API for Axes
170+
```````````````````````````````````````
171+
Added the Axes method :meth:`~matplotlib.axes.Axes.add_image` to put image
172+
handling on a par with artists, collections, containers, lines, patches,
173+
and tables.
174+
175+
169176
Date handling
170177
-------------
171178

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,7 @@ def add_collection(self, collection, autolim=True):
14571457
collection._remove_method = lambda h: self.collections.remove(h)
14581458
return collection
14591459

1460-
def add_line(self, image):
1460+
def add_image(self, image):
14611461
"""
14621462
Add a :class:`~matplotlib.image.AxesImage` to the axes.
14631463

0 commit comments

Comments
 (0)