You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,6 +21,7 @@ The relative width and height of columns and rows in `~.Figure.subplots` and
22
21
*width_ratios* keyword arguments to the methods:
23
22
24
23
.. plot::
24
+
:alt: A figure with 3 subplots in 3 rows and 1 column. The hight of the subplot in the first row is 3 times more than the subplots in the 2nd and 3rd row
25
25
:include-source: true
26
26
27
27
fig = plt.figure()
@@ -58,6 +58,7 @@ With ``layout='tight'`` or ``'constrained'``, Axes with a fixed aspect ratio
58
58
can leave large gaps between each other:
59
59
60
60
.. plot::
61
+
:alt: A 5 by 3 inch figure with subplots displayed in 2 rows and 2 columns; Subplots have large gaps between each other.
61
62
62
63
fig, axs = plt.subplots(2, 2, figsize=(5, 3),
63
64
sharex=True, sharey=True, layout="constrained")
@@ -69,6 +70,8 @@ Using the ``layout='compressed'`` layout reduces the space between the Axes,
69
70
and adds the extra space to the outer margins:
70
71
71
72
.. plot::
73
+
:alt: 4 identical 2 by 2 heatmaps, each cell a different color: purple, blue, yellow, green going clockwise from upper left corner
74
+
the 4 heatmaps are laid out in a 2 by 2 grid with minimum white space between the heatmaps
72
75
73
76
fig, axs = plt.subplots(2, 2, figsize=(5, 3),
74
77
sharex=True, sharey=True, layout='compressed')
@@ -96,6 +99,7 @@ with the previous layout engine.
96
99
may be returned.
97
100
98
101
.. plot::
102
+
:alt: plot of a straight line y=x, with a small inset axis in the lower right corner that shows a circle with radial grid lines and a line plotted in polar coordinates
99
103
:include-source: true
100
104
101
105
fig, ax = plt.subplots()
@@ -147,6 +151,7 @@ The new *gapcolor* parameter to `~.Axes.plot` enables the creation of striped
147
151
lines.
148
152
149
153
.. plot::
154
+
:alt: plot of x**3 where the line is an orange-blue striped line, achieved using the keywords`linestyle='--', color='orange', gapcolor='blue'
150
155
:include-source: true
151
156
152
157
x = np.linspace(1., 3., 10)
@@ -164,6 +169,7 @@ The new *capwidths* parameter to `~.Axes.bxp` and `~.Axes.boxplot` allows
164
169
controlling the widths of the caps in box and whisker plots.
165
170
166
171
.. plot::
172
+
:alt: A box plot with width 0.01 and 0.2
167
173
:include-source: true
168
174
169
175
x = np.linspace(-7, 7, 140)
@@ -184,6 +190,8 @@ label entries, so this is best used when bars also differ in style (e.g., by
184
190
passing a list to *color*, as below.)
185
191
186
192
.. plot::
193
+
:alt: bar chart: blue bar height 10, orange bar height 20, green bar height 15
194
+
legend with blue box labeled a, orange box labeled b, and green box labeled c
187
195
:include-source: true
188
196
189
197
x = ["a", "b", "c"]
@@ -214,6 +222,7 @@ The line style of negative contours may be set by passing the
214
222
only be set globally via :rc:`contour.negative_linestyles`.
215
223
216
224
.. plot::
225
+
:alt: two contour plots, each showing two positive and two negative contours. The positive contours are shown in solid black lines in both plots. In one plot the negative contours are shown in dashed lines, which is the current styling. In the other plot they're shown in dotted lines, which is one of the new options.
217
226
:include-source: true
218
227
219
228
delta = 0.025
@@ -273,6 +282,7 @@ passed to `.Line2D`, rather than claiming that all keyword arguments are passed
273
282
on.
274
283
275
284
.. plot::
285
+
:alt: Graph with error bar showing + or - 0.2 error on the x-axis, and + or - 0.4 in the y axis. Error bar marker is a circle radius 20. Error bar face color is blue
276
286
:include-source: true
277
287
278
288
x = np.arange(0.1, 4, 0.5)
@@ -293,7 +303,8 @@ streamlines. Previously streamlines would end to limit the number of lines
293
303
within a single grid cell. See the difference between the plots below:
294
304
295
305
.. plot::
296
-
306
+
:alt: A figure with two streamplots. First streamplot has broken streamlnes. Second streamplot has continuous streamlines
307
+
297
308
w = 3
298
309
Y, X = np.mgrid[-w:w:100j, -w:w:100j]
299
310
U = -1 - X**2 + Y
@@ -317,6 +328,7 @@ the scale. This is based on an arcsinh transformation that allows plotting both
317
328
positive and negative values that span many orders of magnitude.
318
329
319
330
.. plot::
331
+
:alt: A figure with 2 subplots. Subplot on the left uses symlog scale on the y axis. The transition at -2 is not smooth . Subplot on the right use asinh scale. The transition at -2 is smooth
320
332
321
333
fig, (ax0, ax1) = plt.subplots(1, 2, sharex=True)
322
334
x = np.linspace(-3, 6, 100)
@@ -361,6 +373,10 @@ The rotation point of the `~matplotlib.patches.Rectangle` can now be set to
361
373
'xy', 'center' or a 2-tuple of numbers using the *rotation_point* argument.
362
374
363
375
.. plot::
376
+
:alt: blue square that isn't rotated
377
+
green square rotated 45 degrees relative to center
378
+
orange square rotated 45 degrees relative to lower right corner
379
+
red square rotated 45 degrees relative to point in upper right quadrant
364
380
365
381
fig, ax = plt.subplots()
366
382
@@ -437,6 +453,7 @@ It is now possible to set or get minor ticks using `.pyplot.xticks` and
437
453
`.pyplot.yticks` by setting ``minor=True``.
438
454
439
455
.. plot::
456
+
:alt: Plot showing a line from 1,2 to 3.5,-0.5. X axis showing the points 1,2 and 3 on the x axis as One, Zwei, Trois as minor ticks
440
457
:include-source: true
441
458
442
459
plt.figure()
@@ -456,6 +473,7 @@ the keyword argument *alignment*. You can also use `.Legend.set_alignment` to
456
473
control the alignment on existing Legends.
457
474
458
475
.. plot::
476
+
:alt: Figure with 3 subplots. All the subplots are titled test. The three subplots have legends titled alignment='left', alignment='center',alignment='right'. The legend texts are respectively aligned left, center and right
459
477
:include-source: true
460
478
461
479
fig, axs = plt.subplots(3, 1)
@@ -489,6 +507,19 @@ for the user to supply a transformation to be applied to the marker (e.g. a
489
507
rotation).
490
508
491
509
.. plot::
510
+
:alt: hree rows of markers, columns are blue, green, and purple
511
+
first row is yshaped markers with different capstyles:
512
+
butt: end is squared off at endpoint
513
+
projecting: end is squared off at short distance from endpoint
514
+
round: end is rounded
515
+
second row is star shaped markers with different join styles:
516
+
miter: star points are sharp triangles
517
+
round: star points are rounded
518
+
bevel: star points are beveled
519
+
last row shows stars rotated at different angles:
520
+
small star rotated 0 degrees - top point vertical
521
+
medium star rotated 45 degrees - top point tilted right
522
+
large star rotated 90 degrees - top point tilted left
492
523
:include-source: true
493
524
494
525
from matplotlib.markers import CapStyle, JoinStyle, MarkerStyle
@@ -593,6 +624,7 @@ weight can be set separately from the figure title using :rc:`figure.labelsize`
593
624
and :rc:`figure.labelweight`.
594
625
595
626
.. plot::
627
+
:alt: A figure with 4 plots organised in 2 rows and 2 columns. The title of the figure is suptitle in bold and 64 points. The x axis is labelled supxlabel, and y axis is labelled subylabel. Both labels are 32 points and bold
596
628
:include-source: true
597
629
598
630
# Original (previously combined with below) rcParams:
@@ -660,6 +692,7 @@ The focal length can be calculated from a desired FOV via the equation:
660
692
focal\_length = 1/\tan(FOV/2)
661
693
662
694
.. plot::
695
+
:alt: A figure showing 3 basic 3d Wireframe plots. From left to right, the plots use focal length of 0.2, 1 and infinity. Focal length betwen 0.2 and 1 produce plot with depth while focal length between 1 and infinity show relatively flattened image
663
696
:include-source: true
664
697
665
698
from mpl_toolkits.mplot3d import axes3d
@@ -685,6 +718,8 @@ programmatically. The default roll angle of 0 is backwards-compatible with
685
718
existing 3D plots.
686
719
687
720
.. plot::
721
+
:alt: view of a wireframe of a 3d contour that is somewhat a thickend s shape
722
+
elevation and azimuth are 0 degrees so the shape is veiwed straight on, but tilted because the roll is 30 degrees
688
723
:include-source: true
689
724
690
725
from mpl_toolkits.mplot3d import axes3d
@@ -704,6 +739,13 @@ Users can set the aspect ratio for the X, Y, Z axes of a 3D plot to be 'equal',
704
739
'equalxy', 'equalxz', or 'equalyz' rather than the default of 'auto'.
705
740
706
741
.. plot::
742
+
:alt: 5 plots, each showing a different aspect option for a rectangle that has height 4, depth 1, and width 1
743
+
auto: none of the dimensions have equal aspect, depth and width form a rectangular and height appears shrunken in proportion
744
+
equal: all the dimensions have equal aspect
745
+
equalxy: width and depth equal, height not so looks shrunken in proportion
746
+
equalyz: depth and height equal, width not so elongated
747
+
equalxz: width and height equal, depth not so elongated
0 commit comments