|
15 | 15 |
|
16 | 16 | # %% |
17 | 17 | # A square axes, independent of data |
18 | | -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 | +# ---------------------------------- |
19 | 19 | # |
20 | 20 | # Produce a square axes, no matter what the data limits are. |
21 | 21 |
|
|
31 | 31 |
|
32 | 32 | # %% |
33 | 33 | # Shared square axes |
34 | | -# ~~~~~~~~~~~~~~~~~~ |
| 34 | +# ------------------ |
35 | 35 | # |
36 | 36 | # Produce shared subplots that are squared in size. |
37 | 37 | # |
|
47 | 47 |
|
48 | 48 | # %% |
49 | 49 | # Square twin axes |
50 | | -# ~~~~~~~~~~~~~~~~ |
| 50 | +# ---------------- |
51 | 51 | # |
52 | 52 | # Produce a square axes, with a twin axes. The twinned axes takes over the |
53 | 53 | # box aspect of the parent. |
|
67 | 67 |
|
68 | 68 | # %% |
69 | 69 | # Normal plot next to image |
70 | | -# ~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 70 | +# ------------------------- |
71 | 71 | # |
72 | 72 | # When creating an image plot with fixed data aspect and the default |
73 | 73 | # ``adjustable="box"`` next to a normal plot, the axes would be unequal in |
|
90 | 90 |
|
91 | 91 | # %% |
92 | 92 | # Square joint/marginal plot |
93 | | -# ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 93 | +# -------------------------- |
94 | 94 | # |
95 | 95 | # It may be desirable to show marginal distributions next to a plot of joint |
96 | 96 | # data. The following creates a square plot with the box aspect of the |
|
115 | 115 | plt.show() |
116 | 116 |
|
117 | 117 | # %% |
118 | | -# Square joint/marginal plot |
119 | | -# ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 118 | +# Set data aspect with box aspect |
| 119 | +# ------------------------------- |
120 | 120 | # |
121 | 121 | # When setting the box aspect, one may still set the data aspect as well. |
122 | | -# Here we create an Axes with a box twice as long as tall and use an "equal" |
123 | | -# data aspect for its contents, i.e. the circle actually stays circular. |
| 122 | +# Here we create an Axes with a box twice as long as it is tall and use |
| 123 | +# an "equal" data aspect for its contents, i.e. the circle actually |
| 124 | +# stays circular. |
124 | 125 |
|
125 | 126 | fig6, ax = plt.subplots() |
126 | 127 |
|
|
133 | 134 |
|
134 | 135 | # %% |
135 | 136 | # Box aspect for many subplots |
136 | | -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 137 | +# ---------------------------- |
137 | 138 | # |
138 | 139 | # It is possible to pass the box aspect to an Axes at initialization. The |
139 | 140 | # following creates a 2 by 3 subplot grid with all square Axes. |
|
0 commit comments