From b22d05fdce3ade7cb2bf1e6b24ef1c47879da4c9 Mon Sep 17 00:00:00 2001 From: Xianxiang Li Date: Mon, 15 Mar 2021 18:44:05 +0800 Subject: [PATCH 1/4] Update arrow_guide.py --- examples/shapes_and_collections/arrow_guide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shapes_and_collections/arrow_guide.py b/examples/shapes_and_collections/arrow_guide.py index 239f30cb056b..d8d76055ea1f 100644 --- a/examples/shapes_and_collections/arrow_guide.py +++ b/examples/shapes_and_collections/arrow_guide.py @@ -9,7 +9,7 @@ that behave differently when the data limits on a plot are changed. In general, points on a plot can either be fixed in "data space" or "display space". Something plotted in data space moves when the data limits are altered - an -example would the points in a scatter plot. Something plotted in display space +example would be the points in a scatter plot. Something plotted in display space stays static when data limits are altered - an example would be a figure title or the axis labels. From 0a6009699c4e02addfdc3fb048fd1e8fb0d6c6f2 Mon Sep 17 00:00:00 2001 From: Xianxiang Li Date: Mon, 15 Mar 2021 18:54:27 +0800 Subject: [PATCH 2/4] Update arrow_guide.py to remove redundancy and correct typos --- examples/shapes_and_collections/arrow_guide.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/shapes_and_collections/arrow_guide.py b/examples/shapes_and_collections/arrow_guide.py index d8d76055ea1f..0ccf5cb1bdac 100644 --- a/examples/shapes_and_collections/arrow_guide.py +++ b/examples/shapes_and_collections/arrow_guide.py @@ -39,8 +39,7 @@ # ----------------------------------------------------------------------- # # This is useful if you are annotating a plot, and don't want the arrow to -# to change shape or position if you pan or scale the plot. Note that when -# the axis limits change +# to change shape or position if you pan or scale the plot. # # In this case we use `.patches.FancyArrowPatch` # @@ -63,14 +62,14 @@ # --------------------------------------------------- # # This is useful if you are annotating a plot, and don't want the arrow to -# to change shape or position if you pan or scale the plot. +# change shape or position if you pan or scale the plot. # # In this case we use `.patches.FancyArrowPatch`, and pass the keyword argument # ``transform=ax.transAxes`` where ``ax`` is the axes we are adding the patch # to. # # Note that when the axis limits are changed, the arrow shape and location -# stays the same. +# stay the same. fig, axs = plt.subplots(nrows=2) arrow = mpatches.FancyArrowPatch((x_tail, y_tail), (dx, dy), @@ -93,7 +92,7 @@ # In this case we use `.patches.Arrow` # # Note that when the axis limits are changed, the arrow shape and location -# changes. +# change. fig, axs = plt.subplots(nrows=2) From 932f567946a9e371eaa4d1794096613527267705 Mon Sep 17 00:00:00 2001 From: Xianxiang Li Date: Mon, 15 Mar 2021 19:06:10 +0800 Subject: [PATCH 3/4] Address flake8 requirement --- examples/shapes_and_collections/arrow_guide.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/shapes_and_collections/arrow_guide.py b/examples/shapes_and_collections/arrow_guide.py index 0ccf5cb1bdac..47fa904004fd 100644 --- a/examples/shapes_and_collections/arrow_guide.py +++ b/examples/shapes_and_collections/arrow_guide.py @@ -9,9 +9,9 @@ that behave differently when the data limits on a plot are changed. In general, points on a plot can either be fixed in "data space" or "display space". Something plotted in data space moves when the data limits are altered - an -example would be the points in a scatter plot. Something plotted in display space -stays static when data limits are altered - an example would be a figure title -or the axis labels. +example would be the points in a scatter plot. Something plotted in display +space stays static when data limits are altered - an example would be a +figure title or the axis labels. Arrows consist of a head (and possibly a tail) and a stem drawn between a start point and end point, called 'anchor points' from now on. @@ -39,9 +39,9 @@ # ----------------------------------------------------------------------- # # This is useful if you are annotating a plot, and don't want the arrow to -# to change shape or position if you pan or scale the plot. +# to change shape or position if you pan or scale the plot. # -# In this case we use `.patches.FancyArrowPatch` +# In this case we use `.patches.FancyArrowPatch`. # # Note that when the axis limits are changed, the arrow shape stays the same, # but the anchor points move. @@ -89,7 +89,7 @@ # Head shape and anchor points fixed in data space # ------------------------------------------------ # -# In this case we use `.patches.Arrow` +# In this case we use `.patches.Arrow`. # # Note that when the axis limits are changed, the arrow shape and location # change. From 09ec936d8976b7b58030cac7b2762a9c3e0062b7 Mon Sep 17 00:00:00 2001 From: Xianxiang Li Date: Mon, 15 Mar 2021 19:10:15 +0800 Subject: [PATCH 4/4] Address flake8 requirement --- examples/shapes_and_collections/arrow_guide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shapes_and_collections/arrow_guide.py b/examples/shapes_and_collections/arrow_guide.py index 47fa904004fd..87823dfaa30e 100644 --- a/examples/shapes_and_collections/arrow_guide.py +++ b/examples/shapes_and_collections/arrow_guide.py @@ -10,7 +10,7 @@ points on a plot can either be fixed in "data space" or "display space". Something plotted in data space moves when the data limits are altered - an example would be the points in a scatter plot. Something plotted in display -space stays static when data limits are altered - an example would be a +space stays static when data limits are altered - an example would be a figure title or the axis labels. Arrows consist of a head (and possibly a tail) and a stem drawn between a