From b09ebaa817fd42b955c856f4a2315b1bb8c2b936 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 1 Nov 2023 23:14:18 -0400 Subject: [PATCH] Backport PR #27219: Updated axes_box_aspect.py and angle_annotation.py to regularize formatting --- .../axes_box_aspect.py | 21 ++++++++++--------- .../angle_annotation.py | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py b/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py index 9ad5a14b7649..26974dd49121 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py +++ b/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py @@ -15,7 +15,7 @@ # %% # A square axes, independent of data -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ---------------------------------- # # Produce a square axes, no matter what the data limits are. @@ -31,7 +31,7 @@ # %% # Shared square axes -# ~~~~~~~~~~~~~~~~~~ +# ------------------ # # Produce shared subplots that are squared in size. # @@ -47,7 +47,7 @@ # %% # Square twin axes -# ~~~~~~~~~~~~~~~~ +# ---------------- # # Produce a square axes, with a twin axes. The twinned axes takes over the # box aspect of the parent. @@ -67,7 +67,7 @@ # %% # Normal plot next to image -# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# ------------------------- # # When creating an image plot with fixed data aspect and the default # ``adjustable="box"`` next to a normal plot, the axes would be unequal in @@ -90,7 +90,7 @@ # %% # Square joint/marginal plot -# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# -------------------------- # # It may be desirable to show marginal distributions next to a plot of joint # data. The following creates a square plot with the box aspect of the @@ -115,12 +115,13 @@ plt.show() # %% -# Square joint/marginal plot -# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Set data aspect with box aspect +# ------------------------------- # # When setting the box aspect, one may still set the data aspect as well. -# Here we create an Axes with a box twice as long as tall and use an "equal" -# data aspect for its contents, i.e. the circle actually stays circular. +# Here we create an Axes with a box twice as long as it is tall and use +# an "equal" data aspect for its contents, i.e. the circle actually +# stays circular. fig6, ax = plt.subplots() @@ -133,7 +134,7 @@ # %% # Box aspect for many subplots -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ---------------------------- # # It is possible to pass the box aspect to an Axes at initialization. The # following creates a 2 by 3 subplot grid with all square Axes. diff --git a/galleries/examples/text_labels_and_annotations/angle_annotation.py b/galleries/examples/text_labels_and_annotations/angle_annotation.py index 419d094bb6a9..178f54863477 100644 --- a/galleries/examples/text_labels_and_annotations/angle_annotation.py +++ b/galleries/examples/text_labels_and_annotations/angle_annotation.py @@ -30,7 +30,7 @@ # %% # AngleAnnotation class -# ~~~~~~~~~~~~~~~~~~~~~ +# --------------------- # The essential idea here is to subclass `~.patches.Arc` and set its transform # to the `~.transforms.IdentityTransform`, making the parameters of the arc # defined in pixel space. @@ -215,7 +215,7 @@ def R(a, r, w, h): # .. _angle-annotation-usage: # # Usage -# ~~~~~ +# ----- # # Required arguments to ``AngleAnnotation`` are the center of the arc, *xy*, # and two points, such that the arc spans between the two vectors connecting @@ -254,7 +254,7 @@ def R(a, r, w, h): # %% # ``AngleLabel`` options -# ~~~~~~~~~~~~~~~~~~~~~~ +# ---------------------- # # The *textposition* and *unit* keyword arguments may be used to modify the # location of the text label, as shown below: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy