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

Commitd59d7e5

Browse files
authored
Merge pull request#25027 from greglucas/pcolor-2dmesh
Make pcolor more mesh-like
2 parents4b0cf04 +8f3aa89 commitd59d7e5

File tree

7 files changed

+467
-196
lines changed

7 files changed

+467
-196
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
The object returned by ``pcolor()`` has changed to a ``PolyQuadMesh`` class
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The old object was a `.PolyCollection` with flattened vertices and array data.
5+
The new `.PolyQuadMesh` class subclasses `.PolyCollection`, but adds in better
6+
2D coordinate and array handling in alignment with `.QuadMesh`. Previously, if
7+
a masked array was input, the list of polygons within the collection would shrink
8+
to the size of valid polygons and users were required to keep track of which
9+
polygons were drawn and call ``set_array()`` with the smaller "compressed" array size.
10+
Passing the "compressed" and flattened array values is now deprecated and the
11+
full 2D array of values (including the mask) should be passed
12+
to `.PolyQuadMesh.set_array`.

‎doc/missing-references.json

Lines changed: 55 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
"lib/matplotlib/colorbar.py:docstring of matplotlib.colorbar:1"
2424
],
2525
"matplotlib.axes.Axes.patch": [
26-
"doc/tutorials/intermediate/artists.rst:184",
27-
"doc/tutorials/intermediate/artists.rst:423"
26+
"doc/tutorials/artists.rst:177",
27+
"doc/tutorials/artists.rst:405"
2828
],
2929
"matplotlib.axes.Axes.patches": [
30-
"doc/tutorials/intermediate/artists.rst:461"
30+
"doc/tutorials/artists.rst:443"
3131
],
3232
"matplotlib.axes.Axes.transAxes": [
3333
"lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows:4"
@@ -38,23 +38,25 @@
3838
"lib/mpl_toolkits/axes_grid1/anchored_artists.py:docstring of mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar:4"
3939
],
4040
"matplotlib.axes.Axes.xaxis": [
41-
"doc/tutorials/intermediate/artists.rst:607"
41+
"doc/tutorials/artists.rst:589",
42+
"doc/users/explain/axes/index.rst:133"
4243
],
4344
"matplotlib.axes.Axes.yaxis": [
44-
"doc/tutorials/intermediate/artists.rst:607"
45+
"doc/tutorials/artists.rst:589",
46+
"doc/users/explain/axes/index.rst:133"
4547
],
4648
"matplotlib.axis.Axis.label": [
47-
"doc/tutorials/intermediate/artists.rst:654"
49+
"doc/tutorials/artists.rst:636"
4850
],
4951
"matplotlib.colors.Colormap.name": [
5052
"lib/matplotlib/cm.py:docstring of matplotlib.cm:10"
5153
],
5254
"matplotlib.figure.Figure.patch": [
53-
"doc/tutorials/intermediate/artists.rst:184",
54-
"doc/tutorials/intermediate/artists.rst:317"
55+
"doc/tutorials/artists.rst:177",
56+
"doc/tutorials/artists.rst:310"
5557
],
5658
"matplotlib.figure.Figure.transFigure": [
57-
"doc/tutorials/intermediate/artists.rst:366"
59+
"doc/tutorials/artists.rst:359"
5860
],
5961
"max": [
6062
"lib/matplotlib/transforms.py:docstring of matplotlib.transforms:1"
@@ -106,6 +108,7 @@
106108
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.boxplot:1",
107109
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.clabel:1",
108110
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.csd:1",
111+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.ecdf:1",
109112
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.errorbar:1",
110113
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.eventplot:1",
111114
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figimage:1",
@@ -130,22 +133,13 @@
130133
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.specgram:1",
131134
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.spy:1",
132135
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.stairs:1",
136+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.stem:1",
133137
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.step:1",
134138
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplot_mosaic:1",
135139
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.thetagrids:1",
136140
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.violinplot:1",
137141
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.vlines:1"
138142
],
139-
"Axes": [
140-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.axes:1",
141-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.colorbar:1",
142-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.delaxes:1",
143-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplot2grid:1",
144-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplot_mosaic:1",
145-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:1",
146-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twinx:1",
147-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twiny:1"
148-
],
149143
"ColorType": [
150144
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.errorbar:1",
151145
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.eventplot:1",
@@ -166,9 +160,6 @@
166160
"MarkerType": [
167161
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.scatter:1"
168162
],
169-
"SubplotBase": [
170-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:1"
171-
],
172163
"_AxesBase": [
173164
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twinx:1",
174165
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.twiny:1"
@@ -177,13 +168,13 @@
177168
"doc/api/artist_api.rst:202"
178169
],
179170
"matplotlib.backend_bases.FigureCanvas": [
180-
"doc/tutorials/intermediate/artists.rst:32",
181-
"doc/tutorials/intermediate/artists.rst:34",
182-
"doc/tutorials/intermediate/artists.rst:39"
171+
"doc/tutorials/artists.rst:36",
172+
"doc/tutorials/artists.rst:38",
173+
"doc/tutorials/artists.rst:43"
183174
],
184175
"matplotlib.backend_bases.Renderer": [
185-
"doc/tutorials/intermediate/artists.rst:34",
186-
"doc/tutorials/intermediate/artists.rst:39"
176+
"doc/tutorials/artists.rst:38",
177+
"doc/tutorials/artists.rst:43"
187178
],
188179
"matplotlib.backend_bases._Backend": [
189180
"lib/matplotlib/backend_bases.py:docstring of matplotlib.backend_bases:1"
@@ -212,6 +203,11 @@
212203
"doc/api/collections_api.rst:13",
213204
"lib/matplotlib/collections.py:docstring of matplotlib.collections:1"
214205
],
206+
"matplotlib.collections._MeshData": [
207+
"doc/api/artist_api.rst:202",
208+
"doc/api/collections_api.rst:13",
209+
"lib/matplotlib/collections.py:docstring of matplotlib.collections:1"
210+
],
215211
"matplotlib.image._ImageBase": [
216212
"doc/api/artist_api.rst:202",
217213
"lib/matplotlib/image.py:docstring of matplotlib.image:1"
@@ -247,15 +243,12 @@
247243
],
248244
"mpl_toolkits.axes_grid1.axes_size._Base": [
249245
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Add:1",
250-
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.AddList:1",
251246
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.AxesX:1",
252247
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.AxesY:1",
253248
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Fixed:1",
254249
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Fraction:1",
255250
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.MaxExtent:1",
256-
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Padded:1",
257-
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Scaled:1",
258-
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.SizeFromFunc:1"
251+
"lib/mpl_toolkits/axes_grid1/axes_size.py:docstring of mpl_toolkits.axes_grid1.axes_size.Scaled:1"
259252
],
260253
"mpl_toolkits.axes_grid1.parasite_axes.AxesHostAxes": [
261254
"doc/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.rst:30:<autosummary>:1",
@@ -303,37 +296,33 @@
303296
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.phase_spectrum:1",
304297
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.psd:1",
305298
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.specgram:1",
306-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.subplots:1",
307299
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.xcorr:1",
308300
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.xticks:1",
309301
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.yticks:1"
310302
],
311303
"numpy.uint8": [
312304
"lib/matplotlib/path.py:docstring of matplotlib.path:1"
313-
],
314-
"unittest.case.TestCase": [
315-
"lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators:1"
316305
]
317306
},
318307
"py:data": {
319308
"matplotlib.axes.Axes.transAxes": [
320-
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:240",
321-
"lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.add_axes:18",
322-
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:107",
323-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:249",
324-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:240"
309+
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:238",
310+
"lib/matplotlib/figure.py:docstring of matplotlib.figure.FigureBase.add_artist:1",
311+
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:105",
312+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:242",
313+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:238"
325314
]
326315
},
327316
"py:meth": {
328317
"AbstractPathEffect._update_gc": [
329318
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:26",
330319
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:28",
331320
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:35",
332-
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:39",
333-
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:44"
321+
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:40",
322+
"lib/matplotlib/patheffects.py:docstring of matplotlib.patheffects.AbstractPathEffect:41"
334323
],
335324
"IPython.terminal.interactiveshell.TerminalInteractiveShell.inputhook": [
336-
"doc/users/explain/interactive_guide.rst:420"
325+
"doc/users/explain/figure/interactive_guide.rst:420"
337326
],
338327
"_find_tails": [
339328
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Barbs:5"
@@ -366,26 +355,31 @@
366355
"lib/matplotlib/quiver.py:docstring of matplotlib.quiver.Quiver:38",
367356
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of mpl_toolkits.mplot3d.art3d.Path3DCollection:39",
368357
"lib/mpl_toolkits/mplot3d/art3d.py:docstring of mpl_toolkits.mplot3d.art3d.Poly3DCollection:37"
358+
],
359+
"matplotlib.collections._MeshData.set_array": [
360+
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.pcolormesh:155",
361+
"lib/matplotlib/collections.py:docstring of matplotlib.collections.AsteriskPolygonCollection:1",
362+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.pcolormesh:155"
369363
]
370364
},
371365
"py:obj": {
372366
"Artist.stale_callback": [
373-
"doc/users/explain/interactive_guide.rst:323"
367+
"doc/users/explain/figure/interactive_guide.rst:323"
374368
],
375369
"Artist.sticky_edges": [
376-
"doc/api/axes_api.rst:353:<autosummary>:1",
370+
"doc/api/axes_api.rst:354:<autosummary>:1",
377371
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes.Axes.use_sticky_edges:1"
378372
],
379373
"Axes.dataLim": [
380-
"doc/api/axes_api.rst:292:<autosummary>:1",
374+
"doc/api/axes_api.rst:293:<autosummary>:1",
381375
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.update_datalim:1"
382376
],
383377
"AxesBase": [
384-
"doc/api/axes_api.rst:445:<autosummary>:1",
378+
"doc/api/axes_api.rst:446:<autosummary>:1",
385379
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.add_child_axes:1"
386380
],
387381
"Figure.stale_callback": [
388-
"doc/users/explain/interactive_guide.rst:333"
382+
"doc/users/explain/figure/interactive_guide.rst:333"
389383
],
390384
"Glyph": [
391385
"doc/gallery/misc/ftface_props.rst:28"
@@ -397,7 +391,7 @@
397391
"lib/matplotlib/testing/decorators.py:docstring of matplotlib.testing.decorators:1"
398392
],
399393
"Line2D.pick": [
400-
"doc/users/explain/event_handling.rst:567"
394+
"doc/users/explain/figure/event_handling.rst:568"
401395
],
402396
"QuadContourSet.changed()": [
403397
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.contour:147",
@@ -406,7 +400,7 @@
406400
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.contourf:147"
407401
],
408402
"Rectangle.contains": [
409-
"doc/users/explain/event_handling.rst:279"
403+
"doc/users/explain/figure/event_handling.rst:280"
410404
],
411405
"Size.from_any": [
412406
"lib/mpl_toolkits/axes_grid1/axes_grid.py:docstring of mpl_toolkits.axes_grid1.axes_grid.ImageGrid:53",
@@ -445,11 +439,11 @@
445439
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.inset_axes:6"
446440
],
447441
"axes.bbox": [
448-
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:137",
449-
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:126",
450-
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:4",
451-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:146",
452-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:137"
442+
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:136",
443+
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:69",
444+
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:3",
445+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:140",
446+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:136"
453447
],
454448
"can_composite": [
455449
"lib/matplotlib/image.py:docstring of matplotlib.image:5"
@@ -461,11 +455,11 @@
461455
"lib/matplotlib/backends/backend_agg.py:docstring of matplotlib.backends.backend_agg:1"
462456
],
463457
"figure.bbox": [
464-
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:137",
465-
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:126",
466-
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:4",
467-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:146",
468-
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:137"
458+
"lib/matplotlib/axes/_axes.py:docstring of matplotlib.axes._axes.Axes.legend:136",
459+
"lib/matplotlib/figure.py:docstring of matplotlib.figure.Figure:69",
460+
"lib/matplotlib/legend.py:docstring of matplotlib.legend.Legend:3",
461+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.figlegend:140",
462+
"lib/matplotlib/pyplot.py:docstring of matplotlib.pyplot.legend:136"
469463
],
470464
"fmt_xdata": [
471465
"lib/matplotlib/axes/_base.py:docstring of matplotlib.axes._base._AxesBase.format_xdata:1"
@@ -489,7 +483,7 @@
489483
"lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim:19"
490484
],
491485
"ipykernel.pylab.backend_inline": [
492-
"doc/users/explain/interactive.rst:255"
486+
"doc/users/explain/figure/interactive.rst:264"
493487
],
494488
"kde.covariance_factor": [
495489
"lib/matplotlib/mlab.py:docstring of matplotlib.mlab:40"
@@ -629,9 +623,6 @@
629623
"matplotlib.animation.ImageMagickFileWriter.bin_path": [
630624
"doc/api/_as_gen/matplotlib.animation.ImageMagickFileWriter.rst:27:<autosummary>:1"
631625
],
632-
"matplotlib.animation.ImageMagickFileWriter.delay": [
633-
"lib/matplotlib/animation.py:docstring of matplotlib.animation.ImageMagickFileWriter.input_names:1:<autosummary>:1"
634-
],
635626
"matplotlib.animation.ImageMagickFileWriter.finish": [
636627
"doc/api/_as_gen/matplotlib.animation.ImageMagickFileWriter.rst:27:<autosummary>:1"
637628
],
@@ -647,9 +638,6 @@
647638
"matplotlib.animation.ImageMagickFileWriter.isAvailable": [
648639
"doc/api/_as_gen/matplotlib.animation.ImageMagickFileWriter.rst:27:<autosummary>:1"
649640
],
650-
"matplotlib.animation.ImageMagickFileWriter.output_args": [
651-
"lib/matplotlib/animation.py:docstring of matplotlib.animation.ImageMagickFileWriter.input_names:1:<autosummary>:1"
652-
],
653641
"matplotlib.animation.ImageMagickFileWriter.saving": [
654642
"doc/api/_as_gen/matplotlib.animation.ImageMagickFileWriter.rst:27:<autosummary>:1"
655643
],
@@ -659,9 +647,6 @@
659647
"matplotlib.animation.ImageMagickWriter.bin_path": [
660648
"doc/api/_as_gen/matplotlib.animation.ImageMagickWriter.rst:27:<autosummary>:1"
661649
],
662-
"matplotlib.animation.ImageMagickWriter.delay": [
663-
"lib/matplotlib/animation.py:docstring of matplotlib.animation.ImageMagickWriter.input_names:1:<autosummary>:1"
664-
],
665650
"matplotlib.animation.ImageMagickWriter.finish": [
666651
"doc/api/_as_gen/matplotlib.animation.ImageMagickWriter.rst:27:<autosummary>:1"
667652
],
@@ -674,9 +659,6 @@
674659
"matplotlib.animation.ImageMagickWriter.isAvailable": [
675660
"doc/api/_as_gen/matplotlib.animation.ImageMagickWriter.rst:27:<autosummary>:1"
676661
],
677-
"matplotlib.animation.ImageMagickWriter.output_args": [
678-
"lib/matplotlib/animation.py:docstring of matplotlib.animation.ImageMagickWriter.input_names:1:<autosummary>:1"
679-
],
680662
"matplotlib.animation.ImageMagickWriter.saving": [
681663
"doc/api/_as_gen/matplotlib.animation.ImageMagickWriter.rst:27:<autosummary>:1"
682664
],
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
``PolyQuadMesh`` is a new class for drawing quadrilateral meshes
2+
----------------------------------------------------------------
3+
4+
`~.Axes.pcolor` previously returned a flattened `.PolyCollection` with only
5+
the valid polygons (unmasked) contained within it. Now, we return a `.PolyQuadMesh`,
6+
which is a mixin incorporating the usefulness of 2D array and mesh coordinates
7+
handling, but still inheriting the draw methods of `.PolyCollection`, which enables
8+
more control over the rendering properties than a normal `.QuadMesh` that is
9+
returned from `~.Axes.pcolormesh`. The new class subclasses `.PolyCollection` and thus
10+
should still behave the same as before. This new class keeps track of the mask for
11+
the user and updates the Polygons that are sent to the renderer appropriately.
12+
13+
..plot::
14+
15+
arr = np.arange(12).reshape((3, 4))
16+
17+
fig, ax = plt.subplots()
18+
pc = ax.pcolor(arr)
19+
20+
# Mask one element and show that the hatch is also not drawn
21+
# over that region
22+
pc.set_array(np.ma.masked_equal(arr, 5))
23+
pc.set_hatch('//')
24+
25+
plt.show()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp