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

Appearance settings

Commit cc46ee7

Browse filesBrowse files
authored
Merge pull request #27219 from aseriesof-tubes/issue26862
Updated axes_box_aspect.py and angle_annotation.py to regularize formatting
2 parents ca1880b + b964da6 commit cc46ee7
Copy full SHA for cc46ee7

File tree

Expand file treeCollapse file tree

2 files changed

+14
-13
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+14
-13
lines changed

‎galleries/examples/subplots_axes_and_figures/axes_box_aspect.py

Copy file name to clipboardExpand all lines: galleries/examples/subplots_axes_and_figures/axes_box_aspect.py
+11-10Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# %%
1717
# A square axes, independent of data
18-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+
# ----------------------------------
1919
#
2020
# Produce a square axes, no matter what the data limits are.
2121

@@ -31,7 +31,7 @@
3131

3232
# %%
3333
# Shared square axes
34-
# ~~~~~~~~~~~~~~~~~~
34+
# ------------------
3535
#
3636
# Produce shared subplots that are squared in size.
3737
#
@@ -47,7 +47,7 @@
4747

4848
# %%
4949
# Square twin axes
50-
# ~~~~~~~~~~~~~~~~
50+
# ----------------
5151
#
5252
# Produce a square axes, with a twin axes. The twinned axes takes over the
5353
# box aspect of the parent.
@@ -67,7 +67,7 @@
6767

6868
# %%
6969
# Normal plot next to image
70-
# ~~~~~~~~~~~~~~~~~~~~~~~~~
70+
# -------------------------
7171
#
7272
# When creating an image plot with fixed data aspect and the default
7373
# ``adjustable="box"`` next to a normal plot, the axes would be unequal in
@@ -90,7 +90,7 @@
9090

9191
# %%
9292
# Square joint/marginal plot
93-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
93+
# --------------------------
9494
#
9595
# It may be desirable to show marginal distributions next to a plot of joint
9696
# data. The following creates a square plot with the box aspect of the
@@ -115,12 +115,13 @@
115115
plt.show()
116116

117117
# %%
118-
# Square joint/marginal plot
119-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
118+
# Set data aspect with box aspect
119+
# -------------------------------
120120
#
121121
# 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.
124125

125126
fig6, ax = plt.subplots()
126127

@@ -133,7 +134,7 @@
133134

134135
# %%
135136
# Box aspect for many subplots
136-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137+
# ----------------------------
137138
#
138139
# It is possible to pass the box aspect to an Axes at initialization. The
139140
# following creates a 2 by 3 subplot grid with all square Axes.

‎galleries/examples/text_labels_and_annotations/angle_annotation.py

Copy file name to clipboardExpand all lines: galleries/examples/text_labels_and_annotations/angle_annotation.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
# %%
3232
# AngleAnnotation class
33-
# ~~~~~~~~~~~~~~~~~~~~~
33+
# ---------------------
3434
# The essential idea here is to subclass `~.patches.Arc` and set its transform
3535
# to the `~.transforms.IdentityTransform`, making the parameters of the arc
3636
# defined in pixel space.
@@ -215,7 +215,7 @@ def R(a, r, w, h):
215215
# .. _angle-annotation-usage:
216216
#
217217
# Usage
218-
# ~~~~~
218+
# -----
219219
#
220220
# Required arguments to ``AngleAnnotation`` are the center of the arc, *xy*,
221221
# and two points, such that the arc spans between the two vectors connecting
@@ -254,7 +254,7 @@ def R(a, r, w, h):
254254

255255
# %%
256256
# ``AngleLabel`` options
257-
# ~~~~~~~~~~~~~~~~~~~~~~
257+
# ----------------------
258258
#
259259
# The *textposition* and *unit* keyword arguments may be used to modify the
260260
# location of the text label, as shown below:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.