From d42ee0e22dae4c95e556f70cc1205f3256cbecc0 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 1 Nov 2020 03:00:10 +0100 Subject: [PATCH 1/2] Remove "Demo" from example titles --- .../axes_grid1/demo_anchored_direction_arrows.py | 6 +++--- examples/axes_grid1/demo_axes_divider.py | 6 +++--- examples/axes_grid1/demo_axes_grid2.py | 6 +++--- examples/axes_grid1/demo_axes_rgb.py | 6 +++--- examples/images_contours_and_fields/barb_demo.py | 8 ++++---- .../demo_text_path.py | 12 ++++++------ .../demo_text_rotation_mode.py | 6 +++--- .../fancyarrow_demo.py | 8 +++++--- .../fancytextbox_demo.py | 7 ++++--- .../text_labels_and_annotations/mathtext_demo.py | 6 +++--- .../stix_fonts_demo.py | 6 +++--- .../colorbar_tick_labelling_demo.py | 6 +++--- examples/ticks_and_spines/date_demo_rrule.py | 16 ++++++++++------ .../ticks_and_spines/spine_placement_demo.py | 6 +++--- examples/user_interfaces/wxcursor_demo_sgskip.py | 6 +++--- examples/userdemo/connectionstyle_demo.py | 6 +++--- examples/widgets/lasso_selector_demo_sgskip.py | 6 +++--- examples/widgets/polygon_selector_demo.py | 6 +++--- examples/widgets/slider_demo.py | 6 +++--- 19 files changed, 71 insertions(+), 64 deletions(-) diff --git a/examples/axes_grid1/demo_anchored_direction_arrows.py b/examples/axes_grid1/demo_anchored_direction_arrows.py index 4c353ff85f17..cdf16dc05754 100644 --- a/examples/axes_grid1/demo_anchored_direction_arrows.py +++ b/examples/axes_grid1/demo_anchored_direction_arrows.py @@ -1,7 +1,7 @@ """ -============================= -Demo Anchored Direction Arrow -============================= +======================== +Anchored Direction Arrow +======================== """ import matplotlib.pyplot as plt diff --git a/examples/axes_grid1/demo_axes_divider.py b/examples/axes_grid1/demo_axes_divider.py index d27f4b810e26..dddc2ed4760c 100644 --- a/examples/axes_grid1/demo_axes_divider.py +++ b/examples/axes_grid1/demo_axes_divider.py @@ -1,7 +1,7 @@ """ -================= -Demo Axes Divider -================= +============ +Axes Divider +============ Axes divider to calculate location of axes and create a divider for them using existing axes instances. diff --git a/examples/axes_grid1/demo_axes_grid2.py b/examples/axes_grid1/demo_axes_grid2.py index 4b37190a092f..90c816f4d6b1 100644 --- a/examples/axes_grid1/demo_axes_grid2.py +++ b/examples/axes_grid1/demo_axes_grid2.py @@ -1,7 +1,7 @@ """ -=============== -Demo Axes Grid2 -=============== +========== +Axes Grid2 +========== Grid of images with shared xaxis and yaxis. """ diff --git a/examples/axes_grid1/demo_axes_rgb.py b/examples/axes_grid1/demo_axes_rgb.py index 1e1872de962d..cc188e966a39 100644 --- a/examples/axes_grid1/demo_axes_rgb.py +++ b/examples/axes_grid1/demo_axes_rgb.py @@ -1,7 +1,7 @@ """ -============= -Demo Axes RGB -============= +======= +RGBAxes +======= RGBAxes to show RGB composite images. """ diff --git a/examples/images_contours_and_fields/barb_demo.py b/examples/images_contours_and_fields/barb_demo.py index 569e5f52da33..04bf151e6814 100644 --- a/examples/images_contours_and_fields/barb_demo.py +++ b/examples/images_contours_and_fields/barb_demo.py @@ -1,9 +1,9 @@ """ -========= -Barb Demo -========= +========== +Wind Barbs +========== -Demonstration of wind barb plots +Demonstration of wind barb plots. """ import matplotlib.pyplot as plt import numpy as np diff --git a/examples/text_labels_and_annotations/demo_text_path.py b/examples/text_labels_and_annotations/demo_text_path.py index 938bd80f5fd7..460670d79dae 100644 --- a/examples/text_labels_and_annotations/demo_text_path.py +++ b/examples/text_labels_and_annotations/demo_text_path.py @@ -1,11 +1,11 @@ """ -============== -Demo Text Path -============== +====================== +Using a text as a Path +====================== -Use a text as `.Path`. The tool that allows for such conversion is a -`~matplotlib.textpath.TextPath`. The resulting path can be employed -e.g. as a clip path for an image. +`~matplotlib.textpath.TextPath` creates a `.Path` that is the outline of the +characters of a text. The resulting path can be employed e.g. as a clip path +for an image. """ import matplotlib.pyplot as plt diff --git a/examples/text_labels_and_annotations/demo_text_rotation_mode.py b/examples/text_labels_and_annotations/demo_text_rotation_mode.py index 52b505c85b99..bbe1639706ed 100644 --- a/examples/text_labels_and_annotations/demo_text_rotation_mode.py +++ b/examples/text_labels_and_annotations/demo_text_rotation_mode.py @@ -1,7 +1,7 @@ r""" -======================= -Demo Text Rotation Mode -======================= +================== +Text Rotation Mode +================== This example illustrates the effect of ``rotation_mode`` on the positioning of rotated text. diff --git a/examples/text_labels_and_annotations/fancyarrow_demo.py b/examples/text_labels_and_annotations/fancyarrow_demo.py index cdeecc4086ce..d7ee56c33566 100644 --- a/examples/text_labels_and_annotations/fancyarrow_demo.py +++ b/examples/text_labels_and_annotations/fancyarrow_demo.py @@ -1,7 +1,9 @@ """ -=============== -Fancyarrow Demo -=============== +================================ +Annotation arrow style reference +================================ + +Overview of the arrow styles available in `~.Axes.annotate`. """ import matplotlib.patches as mpatches diff --git a/examples/text_labels_and_annotations/fancytextbox_demo.py b/examples/text_labels_and_annotations/fancytextbox_demo.py index f7616b37bedc..940ed9349170 100644 --- a/examples/text_labels_and_annotations/fancytextbox_demo.py +++ b/examples/text_labels_and_annotations/fancytextbox_demo.py @@ -1,8 +1,9 @@ """ -================= -Fancytextbox Demo -================= +================== +Styling text boxes +================== +This example shows how to style text boxes using *bbox* parameters. """ import matplotlib.pyplot as plt diff --git a/examples/text_labels_and_annotations/mathtext_demo.py b/examples/text_labels_and_annotations/mathtext_demo.py index ab7e1b2bde8a..c41596b91f49 100644 --- a/examples/text_labels_and_annotations/mathtext_demo.py +++ b/examples/text_labels_and_annotations/mathtext_demo.py @@ -1,7 +1,7 @@ """ -============= -Mathtext Demo -============= +======== +Mathtext +======== Use Matplotlib's internal LaTeX parser and layout engine. For true LaTeX rendering, see the text.usetex option. diff --git a/examples/text_labels_and_annotations/stix_fonts_demo.py b/examples/text_labels_and_annotations/stix_fonts_demo.py index c9f263e8c27a..16872d188e4a 100644 --- a/examples/text_labels_and_annotations/stix_fonts_demo.py +++ b/examples/text_labels_and_annotations/stix_fonts_demo.py @@ -1,7 +1,7 @@ """ -=============== -STIX Fonts Demo -=============== +========== +STIX Fonts +========== Demonstration of `STIX Fonts `_ used in LaTeX rendering. diff --git a/examples/ticks_and_spines/colorbar_tick_labelling_demo.py b/examples/ticks_and_spines/colorbar_tick_labelling_demo.py index 1aab0970a3c5..b0d56943fe30 100644 --- a/examples/ticks_and_spines/colorbar_tick_labelling_demo.py +++ b/examples/ticks_and_spines/colorbar_tick_labelling_demo.py @@ -1,7 +1,7 @@ """ -============================ -Colorbar Tick Labelling Demo -============================ +======================= +Colorbar Tick Labelling +======================= Produce custom labelling for a colorbar. diff --git a/examples/ticks_and_spines/date_demo_rrule.py b/examples/ticks_and_spines/date_demo_rrule.py index dec7e07b7165..d358f5731048 100644 --- a/examples/ticks_and_spines/date_demo_rrule.py +++ b/examples/ticks_and_spines/date_demo_rrule.py @@ -1,12 +1,16 @@ """ -=============== -Date Demo Rrule -=============== +========================================= +Placing date ticks using recurrence rules +========================================= -Show how to use an rrule instance to make a custom date ticker - here -we put a tick mark on every 5th easter +The `iCalender RFC`_ specifies *recurrence rules* (rrules), that define +date sequences. You can use rrules in Matplotlib to place date ticks. -See https://dateutil.readthedocs.io/en/stable/ for help with rrules +This example sets custom date ticks on every 5th easter. + +See https://dateutil.readthedocs.io/en/stable/rrule.html for help with rrules. + +.. _iCalender RFC: https://tools.ietf.org/html/rfc5545 """ import matplotlib.pyplot as plt from matplotlib.dates import (YEARLY, DateFormatter, diff --git a/examples/ticks_and_spines/spine_placement_demo.py b/examples/ticks_and_spines/spine_placement_demo.py index b831209abad3..2a82ed3f0dbc 100644 --- a/examples/ticks_and_spines/spine_placement_demo.py +++ b/examples/ticks_and_spines/spine_placement_demo.py @@ -1,7 +1,7 @@ """ -==================== -Spine Placement Demo -==================== +=============== +Spine Placement +=============== Adjusting the location and appearance of axis spines. diff --git a/examples/user_interfaces/wxcursor_demo_sgskip.py b/examples/user_interfaces/wxcursor_demo_sgskip.py index e0e318f85679..c909a3d8baad 100644 --- a/examples/user_interfaces/wxcursor_demo_sgskip.py +++ b/examples/user_interfaces/wxcursor_demo_sgskip.py @@ -1,7 +1,7 @@ """ -============= -WXcursor Demo -============= +===================== +Adding a cursor in WX +===================== Example to draw a cursor and report the data coords in wx. """ diff --git a/examples/userdemo/connectionstyle_demo.py b/examples/userdemo/connectionstyle_demo.py index d429822b6965..ad0f425a3b92 100644 --- a/examples/userdemo/connectionstyle_demo.py +++ b/examples/userdemo/connectionstyle_demo.py @@ -1,7 +1,7 @@ """ -==================== -Connectionstyle Demo -==================== +================================= +Connection styles for annotations +================================= When creating an annotation using `~.Axes.annotate`, the arrow shape can be controlled via the *connectionstyle* parameter of *arrowprops*. For further diff --git a/examples/widgets/lasso_selector_demo_sgskip.py b/examples/widgets/lasso_selector_demo_sgskip.py index b158f0ac78cc..c9ee078390b7 100644 --- a/examples/widgets/lasso_selector_demo_sgskip.py +++ b/examples/widgets/lasso_selector_demo_sgskip.py @@ -1,7 +1,7 @@ """ -=================== -Lasso Selector Demo -=================== +============== +Lasso Selector +============== Interactively selecting data points with the lasso tool. diff --git a/examples/widgets/polygon_selector_demo.py b/examples/widgets/polygon_selector_demo.py index c1340679f31f..aa3f5f73f36d 100644 --- a/examples/widgets/polygon_selector_demo.py +++ b/examples/widgets/polygon_selector_demo.py @@ -1,7 +1,7 @@ """ -===================== -Polygon Selector Demo -===================== +================ +Polygon Selector +================ Shows how one can select indices of a polygon interactively. """ diff --git a/examples/widgets/slider_demo.py b/examples/widgets/slider_demo.py index 4e9af56d7a28..d9571051c11b 100644 --- a/examples/widgets/slider_demo.py +++ b/examples/widgets/slider_demo.py @@ -1,7 +1,7 @@ """ -=========== -Slider Demo -=========== +====== +Slider +====== Using the slider widget to control visual properties of your plot. From a94c94d2ac35c25ba0ae164ac8747ab72052fc33 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Sun, 1 Nov 2020 12:08:47 +0100 Subject: [PATCH 2/2] Remove "Demo" from example titles --- examples/axes_grid1/demo_axes_rgb.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/axes_grid1/demo_axes_rgb.py b/examples/axes_grid1/demo_axes_rgb.py index cc188e966a39..33516bdd23c8 100644 --- a/examples/axes_grid1/demo_axes_rgb.py +++ b/examples/axes_grid1/demo_axes_rgb.py @@ -1,9 +1,11 @@ """ -======= -RGBAxes -======= +================================== +Showing RGB channels using RGBAxes +================================== -RGBAxes to show RGB composite images. +`~.axes_grid1.axes_rgb.RGBAxes` creates a layout of 4 Axes for displaying RGB +channels: one large Axes for the RGB image and 3 smaller Axes for the R, G, B +channels. """ import numpy as np