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

Skip to content

Commit 80a32f9

Browse files
committed
added an entry in whats_new, and fixed the placement of the resize parameter
1 parent ab8e5cf commit 80a32f9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
updated figimage to take optional resize parameter
2+
----------------------------------------------------
3+
Added the ability to plot simple 2D-Array using plt.figimage(X, resize=True).
4+
This is useful for plotting simple 2D-Array without the Axes or whitespacing
5+
around the image.
6+
Example:
7+
data = np.random.random( [500, 500] )
8+
plt.figimage(data, resize=True)

lib/matplotlib/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ def hold(self, b=None):
568568
self._hold = b
569569

570570
def figimage(self, X,
571-
resize=False,
572571
xo=0,
573572
yo=0,
574573
alpha=None,
@@ -577,6 +576,7 @@ def figimage(self, X,
577576
vmin=None,
578577
vmax=None,
579578
origin=None,
579+
resize=False,
580580
**kwargs):
581581
"""
582582
Adds a non-resampled image to the figure.

0 commit comments

Comments
 (0)