From e5a8ef7550d559420611d49ba726dea209c61576 Mon Sep 17 00:00:00 2001 From: dohyun Date: Fri, 27 Oct 2023 19:33:00 -0400 Subject: [PATCH 1/4] regularized formatting --- .../examples/text_labels_and_annotations/angle_annotation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/examples/text_labels_and_annotations/angle_annotation.py b/galleries/examples/text_labels_and_annotations/angle_annotation.py index 419d094bb6a9..fa46d8674443 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 From 10a23c89a0e64c2009d9b2ed663708e097dbcf3b Mon Sep 17 00:00:00 2001 From: dohyun Date: Fri, 27 Oct 2023 19:35:46 -0400 Subject: [PATCH 2/4] regularized formatting --- .../subplots_axes_and_figures/axes_box_aspect.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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..00fdeff17ceb 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 @@ -116,7 +116,7 @@ # %% # Square joint/marginal plot -# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^ # # 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" @@ -133,7 +133,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. From 17557489e6cf3c8a0b9fa42c2d898c38f5761a1b Mon Sep 17 00:00:00 2001 From: dohyun Date: Tue, 31 Oct 2023 22:06:48 -0400 Subject: [PATCH 3/4] formatting, and fixing duplicate section name --- .../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 00fdeff17ceb..8640af0e8c0a 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 fa46d8674443..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: From b964da6e39595d1571d0638804ed109a74d3b4a0 Mon Sep 17 00:00:00 2001 From: dohyun Date: Tue, 31 Oct 2023 22:09:35 -0400 Subject: [PATCH 4/4] removed whitespace --- .../examples/subplots_axes_and_figures/axes_box_aspect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 8640af0e8c0a..26974dd49121 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py +++ b/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py @@ -119,8 +119,8 @@ # ------------------------------- # # 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 it is tall and use -# an "equal" data aspect for its contents, i.e. the circle actually +# 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()