Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit033b666

Browse files
timhoffmdstansby
andauthored
DOC: Improve NonUniformImage docs (#29370)
* DOC: Improve NonUniformImage docs* Update lib/matplotlib/image.pyCo-authored-by: David Stansby <dstansby@gmail.com>---------Co-authored-by: David Stansby <dstansby@gmail.com>
1 parent2c5e469 commit033b666

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
importmatplotlib.pyplotasplt

‎lib/matplotlib/image.py

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

827827
classAxesImage(_ImageBase):
828828
"""
829-
An image attached to an Axes.
829+
An imagewith pixels on a regular grid,attached to an Axes.
830830
831831
Parameters
832832
----------
@@ -1013,6 +1013,14 @@ def get_cursor_data(self, event):
10131013

10141014

10151015
classNonUniformImage(AxesImage):
1016+
"""
1017+
An image with pixels on a rectilinear grid.
1018+
1019+
In contrast to `.AxesImage`, where pixels are on a regular grid,
1020+
NonUniformImage allows rows and columns with individual heights / widths.
1021+
1022+
See also :doc:`/gallery/images_contours_and_fields/image_nonuniform`.
1023+
"""
10161024

10171025
def__init__(self,ax,*,interpolation='nearest',**kwargs):
10181026
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp