8000 DOC: Use Unicode characters for diagrams · matplotlib/matplotlib@e830dd8 · GitHub
[go: up one dir, main page]

Skip to content

Commit e830dd8

Browse files
committed
DOC: Use Unicode characters for diagrams
This also fixes some broken diagrams due to incorrect code block setup.
1 parent 9cc8f2d commit e830dd8

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 6 deletions
< 10000 td data-grid-cell-id="diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900-6071-6070-2" data-line-anchor="diff-608e2a1bf3d32fd631b0763599a3334d59822c11cb4fec1fa7398c9714592900L6071" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-deletionLine-bgColor, var(--diffBlob-deletion-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell left-side-diff-cell border-right left-side">-
+-----+
Original file line numberDiff line numberDiff line change
@@ -5826,9 +5826,9 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
58265826
The coordinates of the corners of quadrilaterals of a pcolormesh::
58275827
58285828
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
5829-
+-----+
5830-
| |
5831-
+-----+
5829+
┌─────┐
5830+
5831+
└─────┘
58325832
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
58335833
58345834
Note that the column index corresponds to the x-coordinate, and
@@ -6068,9 +6068,9 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
60686068
The coordinates of the corners of quadrilaterals of a pcolormesh::
60696069
60706070
(X[i+1, j], Y[i+1, j]) (X[i+1, j+1], Y[i+1, j+1])
6071
6072-
| |
6073-
+-----+
6071+
┌─────┐
6072+
6073+
└─────┘
60746074
(X[i, j], Y[i, j]) (X[i, j+1], Y[i, j+1])
60756075
60766076
Note that the column index corresponds to the x-coordinate, and

lib/matplotlib/axes/_base.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1892,17 +1892,15 @@ def set_anchor(self, anchor, share=False):
18921892
Either an (*x*, *y*) pair of relative coordinates (0 is left or
18931893
bottom, 1 is right or top), 'C' (center), or a cardinal direction
18941894
('SW', southwest, is bottom left, etc.). str inputs are shorthands
1895-
for (*x*, *y*) coordinates, as shown in the following table::
1896-
1897-
.. code-block:: none
1898-
1899-
+-----------------+-----------------+-----------------+
1900-
| 'NW' (0.0, 1.0) | 'N' (0.5, 1.0) | 'NE' (1.0, 1.0) |
1901-
+-----------------+-----------------+-----------------+
1902-
| 'W' (0.0, 0.5) | 'C' (0.5, 0.5) | 'E' (1.0, 0.5) |
1903-
+-----------------+-----------------+-----------------+
1904-
| 'SW' (0.0, 0.0) | 'S' (0.5, 0.0) | 'SE' (1.0, 0.0) |
1905-
+-----------------+-----------------+-----------------+
1895+
for (*x*, *y*) coordinates, as shown in the following diagram::
1896+
1897+
┌─────────────────┬─────────────────┬─────────────────┐
1898+
│ 'NW' (0.0, 1.0) │ 'N' (0.5, 1.0) │ 'NE' (1.0, 1.0) │
1899+
├─────────────────┼─────────────────┼─────────────────┤
1900+
│ 'W' (0.0, 0.5) │ 'C' (0.5, 0.5) │ 'E' (1.0, 0.5) │
1901+
├─────────────────┼─────────────────┼─────────────────┤
1902+
│ 'SW' (0.0, 0.0) │ 'S' (0.5, 0.0) │ 'SE' (1.0, 0.0) │
1903+
└─────────────────┴─────────────────┴─────────────────┘
19061904
19071905
share : bool, default: False
19081906
If ``True``, apply the settings to all shared Axes.

lib/mpl_toolkits/axes_grid1/axes_rgb.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ class RGBAxes:
6161
"""
6262
4-panel `~.Axes.imshow` (RGB, R, G, B).
6363
64-
Layout:
65-
66-
+---------------+-----+
67-
| | R |
68-
+ +-----+
69-
| RGB | G |
70-
+ +-----+
71-
| | B |
72-
+---------------+-----+
64+
Layout::
65+
66+
┌───────────────┬─────┐
67+
R
68+
├─────┤
69+
RGB G
70+
├─────┤
71+
B
72+
└───────────────┴─────┘
7373
7474
Subclasses can override the ``_defaultAxesClass`` attribute.
7575
By default RGBAxes uses `.mpl_axes.Axes`.

tutorials/toolkits/axes_grid.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,13 +268,13 @@
268268
269269
.. code-block:: none
270270
271-
+--------+--------+--------+--------+
272-
| (2, 0) | (2, 1) | (2, 2) | (2, 3) |
273-
+--------+--------+--------+--------+
274-
| (1, 0) | (1, 1) | (1, 2) | (1, 3) |
275-
+--------+--------+--------+--------+
276-
| (0, 0) | (0, 1) | (0, 2) | (0, 3) |
277-
+--------+--------+--------+--------+
271+
┌────────┬────────┬────────┬────────┐
272+
(2, 0) (2, 1) (2, 2) (2, 3)
273+
├────────┼────────┼────────┼────────┤
274+
(1, 0) (1, 1) (1, 2) (1, 3)
275+
├────────┼────────┼────────┼────────┤
276+
(0, 0) (0, 1) (0, 2) (0, 3)
277+
└────────┴────────┴────────┴────────┘
278278
279279
such that the bottom row has a fixed height of 2 (inches) and the top two rows
280280
have a height ratio of 2 (middle) to 3 (top). (For example, if the grid has

0 commit comments

Comments
 (0)
0