Skip to content

Commit 1591005

Browse files
committed
DOC: Improve NonUniformImage docs
1 parent 677d990 commit 1591005

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

galleries/examples/images_contours_and_fields/image_nonuniform.py

Lines 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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ def get_filterrad(self):
808808

809809
class AxesImage(_ImageBase):
810810
"""
811-
An image attached to an Axes.
811+
An image, i.e. data on a regular grid, attached to an Axes.
812812
813813
Parameters
814814
----------
@@ -995,6 +995,14 @@ def get_cursor_data(self, event):
995995

996996

997997
class NonUniformImage(AxesImage):
998+
"""
999+
An image with pixels on a rectilinear grid.
1000+
1001+
In contrast to `.AxesImage`, where pixels are on a regular grid,
1002+
NonUniformImage allows rows and columns with individual heights / widths.
1003+
1004+
See also :doc:`/gallery/images_contours_and_fields/image_nonuniform`.
1005+
"""
9981006

9991007
def __init__(self, ax, *, interpolation='nearest', **kwargs):
10001008
"""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy