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

Commit155ae8a

Browse files
committed
Updates based on code review
1 parent4af03f4 commit155ae8a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎galleries/examples/images_contours_and_fields/multi_image.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
importmatplotlib.pyplotasplt
2121
importnumpyasnp
2222

23-
importmatplotlibasmpl
23+
importmatplotlib.colorizerasmcolorizer
24+
importmatplotlib.colorsasmcolors
2425

2526
np.random.seed(19680801)
2627

@@ -32,9 +33,9 @@
3233
fig,axs=plt.subplots(2,2)
3334
fig.suptitle('Multiple images')
3435

35-
# create asingle norm and colorizer to be shared across all images
36-
norm=mpl.colors.Normalize(vmin=np.min(datasets),vmax=np.max(datasets))
37-
colorizer=mpl.colorizer.Colorizer(norm=norm)
36+
# create acolorizer with a predefined norm to be shared across all images
37+
norm=mcolors.Normalize(vmin=np.min(datasets),vmax=np.max(datasets))
38+
colorizer=mcolorizer.Colorizer(norm=norm)
3839

3940
images= []
4041
forax,datainzip(axs.flat,datasets):
@@ -61,4 +62,3 @@
6162
# - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar`
6263
# - `matplotlib.colorizer.Colorizer`
6364
# - `matplotlib.colors.Normalize`
64-
# - `matplotlib.cbook.CallbackRegistry.connect`

‎galleries/users_explain/colors/colorbar_only.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
This tutorial shows how to build and customize standalone colorbars, i.e.
99
without an attached plot.
1010
11-
A `~.Figure.colorbar` needs a "mappable" (`matplotlib.colorizer.ColorizingArtist`)
12-
object (typically, an image) which contains a colorizer
13-
(`matplotlib.colorizer.Colorizer`) that holds the data-to-color pipeline (norm and
14-
colormap). In order to create a colorbar without an attached image, one can instead
11+
A `~.Figure.colorbar` requires a `matplotlib.colorizer.ColorizingArtist` which
12+
contains a `matplotlib.colorizer.Colorizer` that holds the data-to-color pipeline
13+
(norm and colormap). To create a colorbar without an attached plot one can
1514
use a `.ColorizingArtist` with no associated data.
15+
1616
"""
1717

1818
importmatplotlib.pyplotasplt

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp