Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2322a8f

Browse filesBrowse files
authored
Merge pull request #29987 from meeseeksmachine/auto-backport-of-pr-29370-on-v3.10.x
Backport PR #29370 on branch v3.10.x (DOC: Improve NonUniformImage docs)
2 parents 495fb64 + 7dab28b commit 2322a8f
Copy full SHA for 2322a8f

File tree

2 files changed

+15
-4
lines changed
Filter options

2 files changed

+15
-4
lines changed

‎galleries/examples/images_contours_and_fields/image_nonuniform.py

Copy file name to clipboardExpand all lines: galleries/examples/images_contours_and_fields/image_nonuniform.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
Image nonuniform
44
================
55
6-
This illustrates the NonUniformImage class. It is not
7-
available via an Axes method, but it is easily added to an
8-
Axes instance as shown here.
6+
`.NonUniformImage` is a generalized image with pixels on a rectilinear grid,
7+
i.e. it allows rows and columns with individual heights / widths.
8+
9+
There is no high-level plotting method on `~.axes.Axes` or `.pyplot` to
10+
create a NonUniformImage. Instead, you have to instantiate the image
11+
explicitly add it to the Axes using `.Axes.add_image`.
912
"""
1013

1114
import matplotlib.pyplot as plt

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def get_filterrad(self):
818818

819819
class AxesImage(_ImageBase):
820820
"""
821-
An image attached to an Axes.
821+
An image with pixels on a regular grid, attached to an Axes.
822822
823823
Parameters
824824
----------
@@ -1005,6 +1005,14 @@ def get_cursor_data(self, event):
10051005

10061006

10071007
class NonUniformImage(AxesImage):
1008+
"""
1009+
An image with pixels on a rectilinear grid.
1010+
1011+
In contrast to `.AxesImage`, where pixels are on a regular grid,
1012+
NonUniformImage allows rows and columns with individual heights / widths.
1013+
1014+
See also :doc:`/gallery/images_contours_and_fields/image_nonuniform`.
1015+
"""
10081016

10091017
def __init__(self, ax, *, interpolation='nearest', **kwargs):
10101018
"""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.