From eecc0a09ddaadb575f001a1c3c57f3a838977dd9 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 12 Jul 2024 09:53:59 +0200 Subject: [PATCH] DOC: Standardize example titles Following recommendatinos from #28527, this improves example titles. Take this as an incremental improvement. I've changed what I saw at a glance when going through the examples once. Certainly, one could do further improvements, but that can be done in follow-ups. Co-authored-by: hannah --- galleries/examples/animation/pause_resume.py | 2 +- galleries/examples/animation/unchained.py | 6 +++--- .../examples/axes_grid1/scatter_hist_locatable_axes.py | 6 +++--- galleries/examples/axisartist/simple_axis_pad.py | 2 +- galleries/examples/event_handling/close_event.py | 2 +- galleries/examples/event_handling/looking_glass.py | 2 +- galleries/examples/event_handling/poly_editor.py | 6 +++--- galleries/examples/event_handling/zoom_window.py | 6 +++--- .../examples/images_contours_and_fields/barb_demo.py | 2 +- .../colormap_interactive_adjustment.py | 2 +- .../images_contours_and_fields/contour_corner_mask.py | 2 +- .../examples/images_contours_and_fields/contour_image.py | 2 +- .../images_contours_and_fields/contourf_hatching.py | 2 +- .../examples/images_contours_and_fields/image_masked.py | 6 +++--- .../examples/images_contours_and_fields/layer_images.py | 6 +++--- .../examples/lines_bars_and_markers/bar_label_demo.py | 6 +++--- .../examples/lines_bars_and_markers/fill_between_alpha.py | 5 +++-- .../examples/lines_bars_and_markers/scatter_masked.py | 6 +++--- galleries/examples/lines_bars_and_markers/simple_plot.py | 8 ++++---- galleries/examples/lines_bars_and_markers/stem_plot.py | 2 +- galleries/examples/misc/image_thumbnail_sgskip.py | 2 +- galleries/examples/misc/print_stdout_sgskip.py | 6 +++--- galleries/examples/misc/svg_filter_line.py | 6 +++--- galleries/examples/scales/aspect_loglog.py | 2 +- galleries/examples/shapes_and_collections/quad_bezier.py | 2 +- .../subplots_axes_and_figures/align_labels_demo.py | 6 +++--- .../examples/subplots_axes_and_figures/axes_props.py | 6 +++--- .../subplots_axes_and_figures/axes_zoom_effect.py | 2 +- .../subplots_axes_and_figures/axis_labels_demo.py | 2 +- .../examples/subplots_axes_and_figures/broken_axis.py | 2 +- .../text_labels_and_annotations/annotate_transform.py | 2 +- .../text_labels_and_annotations/annotation_demo.py | 6 +++--- .../text_labels_and_annotations/annotation_polar.py | 6 +++--- .../text_labels_and_annotations/custom_legends.py | 6 +++--- .../demo_text_rotation_mode.py | 2 +- .../text_labels_and_annotations/mathtext_examples.py | 6 +++--- .../examples/text_labels_and_annotations/text_commands.py | 6 +++--- .../text_rotation_relative_to_line.py | 6 +++--- .../text_labels_and_annotations/usetex_baseline_test.py | 2 +- galleries/examples/ticks/date_precision_and_epochs.py | 2 +- galleries/examples/units/units_sample.py | 2 +- galleries/examples/widgets/range_slider.py | 6 +++--- 42 files changed, 85 insertions(+), 84 deletions(-) diff --git a/galleries/examples/animation/pause_resume.py b/galleries/examples/animation/pause_resume.py index 7b1fade30322..13de31f36f89 100644 --- a/galleries/examples/animation/pause_resume.py +++ b/galleries/examples/animation/pause_resume.py @@ -1,6 +1,6 @@ """ ================================= -Pausing and Resuming an Animation +Pausing and resuming an animation ================================= This example showcases: diff --git a/galleries/examples/animation/unchained.py b/galleries/examples/animation/unchained.py index e93ed03ff99e..4c49d80bba81 100644 --- a/galleries/examples/animation/unchained.py +++ b/galleries/examples/animation/unchained.py @@ -1,7 +1,7 @@ """ -======================== -MATPLOTLIB **UNCHAINED** -======================== +==================== +Matplotlib unchained +==================== Comparative path demonstration of frequency from a fake signal of a pulsar (mostly known because of the cover for Joy Division's Unknown Pleasures). diff --git a/galleries/examples/axes_grid1/scatter_hist_locatable_axes.py b/galleries/examples/axes_grid1/scatter_hist_locatable_axes.py index e5ff19d9ee08..3f9bc4305b3f 100644 --- a/galleries/examples/axes_grid1/scatter_hist_locatable_axes.py +++ b/galleries/examples/axes_grid1/scatter_hist_locatable_axes.py @@ -1,7 +1,7 @@ """ -================================== -Scatter Histogram (Locatable Axes) -================================== +==================================================== +Align histogram to scatter plot using locatable Axes +==================================================== Show the marginal distributions of a scatter plot as histograms at the sides of the plot. diff --git a/galleries/examples/axisartist/simple_axis_pad.py b/galleries/examples/axisartist/simple_axis_pad.py index 9c613c820b2b..95f30ce1ffbc 100644 --- a/galleries/examples/axisartist/simple_axis_pad.py +++ b/galleries/examples/axisartist/simple_axis_pad.py @@ -1,6 +1,6 @@ """ =============== -Simple Axis Pad +Simple axis pad =============== """ diff --git a/galleries/examples/event_handling/close_event.py b/galleries/examples/event_handling/close_event.py index 24b45b74ea48..060388269c8c 100644 --- a/galleries/examples/event_handling/close_event.py +++ b/galleries/examples/event_handling/close_event.py @@ -1,6 +1,6 @@ """ =========== -Close Event +Close event =========== Example to show connecting events that occur when the figure closes. diff --git a/galleries/examples/event_handling/looking_glass.py b/galleries/examples/event_handling/looking_glass.py index 6032b39b5b9e..a2a5f396c75a 100644 --- a/galleries/examples/event_handling/looking_glass.py +++ b/galleries/examples/event_handling/looking_glass.py @@ -1,6 +1,6 @@ """ ============= -Looking Glass +Looking glass ============= Example using mouse events to simulate a looking glass for inspecting data. diff --git a/galleries/examples/event_handling/poly_editor.py b/galleries/examples/event_handling/poly_editor.py index 5465cca0ed94..f6efd8bb8446 100644 --- a/galleries/examples/event_handling/poly_editor.py +++ b/galleries/examples/event_handling/poly_editor.py @@ -1,7 +1,7 @@ """ -=========== -Poly Editor -=========== +============== +Polygon editor +============== This is an example to show how to build cross-GUI applications using Matplotlib event handling to interact with objects on the canvas. diff --git a/galleries/examples/event_handling/zoom_window.py b/galleries/examples/event_handling/zoom_window.py index b8ba4c1048a9..6a90a175fb68 100644 --- a/galleries/examples/event_handling/zoom_window.py +++ b/galleries/examples/event_handling/zoom_window.py @@ -1,7 +1,7 @@ """ -=========== -Zoom Window -=========== +======================== +Zoom modifies other Axes +======================== This example shows how to connect events in one window, for example, a mouse press, to another figure window. diff --git a/galleries/examples/images_contours_and_fields/barb_demo.py b/galleries/examples/images_contours_and_fields/barb_demo.py index d3ade99d927c..9229b5262a2c 100644 --- a/galleries/examples/images_contours_and_fields/barb_demo.py +++ b/galleries/examples/images_contours_and_fields/barb_demo.py @@ -1,6 +1,6 @@ """ ========== -Wind Barbs +Wind barbs ========== Demonstration of wind barb plots. diff --git a/galleries/examples/images_contours_and_fields/colormap_interactive_adjustment.py b/galleries/examples/images_contours_and_fields/colormap_interactive_adjustment.py index 3ab9074fd1b6..3db799894c95 100644 --- a/galleries/examples/images_contours_and_fields/colormap_interactive_adjustment.py +++ b/galleries/examples/images_contours_and_fields/colormap_interactive_adjustment.py @@ -1,6 +1,6 @@ """ ======================================== -Interactive Adjustment of Colormap Range +Interactive adjustment of colormap range ======================================== Demonstration of how a colorbar can be used to interactively adjust the diff --git a/galleries/examples/images_contours_and_fields/contour_corner_mask.py b/galleries/examples/images_contours_and_fields/contour_corner_mask.py index 400f47aa4db5..696231146733 100644 --- a/galleries/examples/images_contours_and_fields/contour_corner_mask.py +++ b/galleries/examples/images_contours_and_fields/contour_corner_mask.py @@ -1,6 +1,6 @@ """ =================== -Contour Corner Mask +Contour corner mask =================== Illustrate the difference between ``corner_mask=False`` and diff --git a/galleries/examples/images_contours_and_fields/contour_image.py b/galleries/examples/images_contours_and_fields/contour_image.py index 3b33233852b7..f60cfee2b61e 100644 --- a/galleries/examples/images_contours_and_fields/contour_image.py +++ b/galleries/examples/images_contours_and_fields/contour_image.py @@ -1,6 +1,6 @@ """ ============= -Contour Image +Contour image ============= Test combinations of contouring, filled contouring, and image plotting. diff --git a/galleries/examples/images_contours_and_fields/contourf_hatching.py b/galleries/examples/images_contours_and_fields/contourf_hatching.py index f8131b41cfa5..020c20b44ec4 100644 --- a/galleries/examples/images_contours_and_fields/contourf_hatching.py +++ b/galleries/examples/images_contours_and_fields/contourf_hatching.py @@ -1,6 +1,6 @@ """ ================= -Contourf Hatching +Contourf hatching ================= Demo filled contour plots with hatched patterns. diff --git a/galleries/examples/images_contours_and_fields/image_masked.py b/galleries/examples/images_contours_and_fields/image_masked.py index d64ab2cff8c7..3d4058c62eb7 100644 --- a/galleries/examples/images_contours_and_fields/image_masked.py +++ b/galleries/examples/images_contours_and_fields/image_masked.py @@ -1,7 +1,7 @@ """ -============ -Image Masked -============ +======================== +Image with masked values +======================== imshow with masked array input and out-of-range colors. diff --git a/galleries/examples/images_contours_and_fields/layer_images.py b/galleries/examples/images_contours_and_fields/layer_images.py index bcaa25471500..c67c08960ecd 100644 --- a/galleries/examples/images_contours_and_fields/layer_images.py +++ b/galleries/examples/images_contours_and_fields/layer_images.py @@ -1,7 +1,7 @@ """ -============ -Layer Images -============ +================================ +Layer images with alpha blending +================================ Layer images above one another using alpha blending """ diff --git a/galleries/examples/lines_bars_and_markers/bar_label_demo.py b/galleries/examples/lines_bars_and_markers/bar_label_demo.py index d60bd2a16299..8393407d1c57 100644 --- a/galleries/examples/lines_bars_and_markers/bar_label_demo.py +++ b/galleries/examples/lines_bars_and_markers/bar_label_demo.py @@ -1,7 +1,7 @@ """ -============== -Bar Label Demo -============== +===================== +Bar chart with labels +===================== This example shows how to use the `~.Axes.bar_label` helper function to create bar chart labels. diff --git a/galleries/examples/lines_bars_and_markers/fill_between_alpha.py b/galleries/examples/lines_bars_and_markers/fill_between_alpha.py index 3894d9d1d45c..2887310378d1 100644 --- a/galleries/examples/lines_bars_and_markers/fill_between_alpha.py +++ b/galleries/examples/lines_bars_and_markers/fill_between_alpha.py @@ -1,6 +1,7 @@ """ -Fill Between and Alpha -====================== +============================== +Fill Between with transparency +============================== The `~matplotlib.axes.Axes.fill_between` function generates a shaded region between a min and max boundary that is useful for illustrating ranges. diff --git a/galleries/examples/lines_bars_and_markers/scatter_masked.py b/galleries/examples/lines_bars_and_markers/scatter_masked.py index 22c0943bf28a..c8e603e6f3b0 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_masked.py +++ b/galleries/examples/lines_bars_and_markers/scatter_masked.py @@ -1,7 +1,7 @@ """ -============== -Scatter Masked -============== +========================== +Scatter with masked values +========================== Mask some data points and add a line demarking masked regions. diff --git a/galleries/examples/lines_bars_and_markers/simple_plot.py b/galleries/examples/lines_bars_and_markers/simple_plot.py index 520d6fac8204..c8182035fc41 100644 --- a/galleries/examples/lines_bars_and_markers/simple_plot.py +++ b/galleries/examples/lines_bars_and_markers/simple_plot.py @@ -1,9 +1,9 @@ """ -=========== -Simple Plot -=========== +========= +Line plot +========= -Create a simple plot. +Create a basic line plot. """ import matplotlib.pyplot as plt diff --git a/galleries/examples/lines_bars_and_markers/stem_plot.py b/galleries/examples/lines_bars_and_markers/stem_plot.py index f3035c1673e6..d779197e50cc 100644 --- a/galleries/examples/lines_bars_and_markers/stem_plot.py +++ b/galleries/examples/lines_bars_and_markers/stem_plot.py @@ -1,6 +1,6 @@ """ ========= -Stem Plot +Stem plot ========= `~.pyplot.stem` plots vertical lines from a baseline to the y-coordinate and diff --git a/galleries/examples/misc/image_thumbnail_sgskip.py b/galleries/examples/misc/image_thumbnail_sgskip.py index edc1e5aa3573..55217cfdca02 100644 --- a/galleries/examples/misc/image_thumbnail_sgskip.py +++ b/galleries/examples/misc/image_thumbnail_sgskip.py @@ -1,6 +1,6 @@ """ =============== -Image Thumbnail +Image thumbnail =============== You can use Matplotlib to generate thumbnails from existing images. diff --git a/galleries/examples/misc/print_stdout_sgskip.py b/galleries/examples/misc/print_stdout_sgskip.py index 4a8b63f6d03e..9c9848a73d9c 100644 --- a/galleries/examples/misc/print_stdout_sgskip.py +++ b/galleries/examples/misc/print_stdout_sgskip.py @@ -1,7 +1,7 @@ """ -============ -Print Stdout -============ +===================== +Print image to stdout +===================== print png to standard out diff --git a/galleries/examples/misc/svg_filter_line.py b/galleries/examples/misc/svg_filter_line.py index 5cc4af5d7a66..c6adec093bee 100644 --- a/galleries/examples/misc/svg_filter_line.py +++ b/galleries/examples/misc/svg_filter_line.py @@ -1,7 +1,7 @@ """ -=============== -SVG Filter Line -=============== +========================== +Apply SVG filter to a line +========================== Demonstrate SVG filtering effects which might be used with Matplotlib. diff --git a/galleries/examples/scales/aspect_loglog.py b/galleries/examples/scales/aspect_loglog.py index 90c0422ca389..420721b9b411 100644 --- a/galleries/examples/scales/aspect_loglog.py +++ b/galleries/examples/scales/aspect_loglog.py @@ -1,6 +1,6 @@ """ ============= -Loglog Aspect +Loglog aspect ============= """ diff --git a/galleries/examples/shapes_and_collections/quad_bezier.py b/galleries/examples/shapes_and_collections/quad_bezier.py index 6f91ad85bf8f..f4a688233ba9 100644 --- a/galleries/examples/shapes_and_collections/quad_bezier.py +++ b/galleries/examples/shapes_and_collections/quad_bezier.py @@ -1,6 +1,6 @@ """ ============ -Bezier Curve +Bezier curve ============ This example showcases the `~.patches.PathPatch` object to create a Bezier diff --git a/galleries/examples/subplots_axes_and_figures/align_labels_demo.py b/galleries/examples/subplots_axes_and_figures/align_labels_demo.py index 4935878ee027..8e9a70d4ccd9 100644 --- a/galleries/examples/subplots_axes_and_figures/align_labels_demo.py +++ b/galleries/examples/subplots_axes_and_figures/align_labels_demo.py @@ -1,7 +1,7 @@ """ -========================== -Aligning Labels and Titles -========================== +======================= +Align labels and titles +======================= Aligning xlabel, ylabel, and title using `.Figure.align_xlabels`, `.Figure.align_ylabels`, and `.Figure.align_titles`. diff --git a/galleries/examples/subplots_axes_and_figures/axes_props.py b/galleries/examples/subplots_axes_and_figures/axes_props.py index f2e52febed34..106c8e0db1ee 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_props.py +++ b/galleries/examples/subplots_axes_and_figures/axes_props.py @@ -1,7 +1,7 @@ """ -========== -Axes Props -========== +=============== +Axes properties +=============== You can control the axis tick and grid properties """ diff --git a/galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py b/galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py index 49a44b9e4f43..f139d0209427 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py +++ b/galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py @@ -1,6 +1,6 @@ """ ================ -Axes Zoom Effect +Axes zoom effect ================ """ diff --git a/galleries/examples/subplots_axes_and_figures/axis_labels_demo.py b/galleries/examples/subplots_axes_and_figures/axis_labels_demo.py index 8b9d38240e42..ea99b78d8fb0 100644 --- a/galleries/examples/subplots_axes_and_figures/axis_labels_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axis_labels_demo.py @@ -1,6 +1,6 @@ """ =================== -Axis Label Position +Axis label position =================== Choose axis label position when calling `~.Axes.set_xlabel` and diff --git a/galleries/examples/subplots_axes_and_figures/broken_axis.py b/galleries/examples/subplots_axes_and_figures/broken_axis.py index 06263b9c120a..4d6ece305ed6 100644 --- a/galleries/examples/subplots_axes_and_figures/broken_axis.py +++ b/galleries/examples/subplots_axes_and_figures/broken_axis.py @@ -1,6 +1,6 @@ """ =========== -Broken Axis +Broken axis =========== Broken axis example, where the y-axis will have a portion cut out. diff --git a/galleries/examples/text_labels_and_annotations/annotate_transform.py b/galleries/examples/text_labels_and_annotations/annotate_transform.py index b2ce1de6a0c1..e7d4e11d9d38 100644 --- a/galleries/examples/text_labels_and_annotations/annotate_transform.py +++ b/galleries/examples/text_labels_and_annotations/annotate_transform.py @@ -1,6 +1,6 @@ """ ================== -Annotate Transform +Annotate transform ================== This example shows how to use different coordinate systems for annotations. diff --git a/galleries/examples/text_labels_and_annotations/annotation_demo.py b/galleries/examples/text_labels_and_annotations/annotation_demo.py index 5358bfaac60a..562948bcc512 100644 --- a/galleries/examples/text_labels_and_annotations/annotation_demo.py +++ b/galleries/examples/text_labels_and_annotations/annotation_demo.py @@ -1,7 +1,7 @@ """ -================ -Annotating Plots -================ +============== +Annotate plots +============== The following examples show ways to annotate plots in Matplotlib. This includes highlighting specific points of interest and using various diff --git a/galleries/examples/text_labels_and_annotations/annotation_polar.py b/galleries/examples/text_labels_and_annotations/annotation_polar.py index bbd46478bced..c2418519cf8c 100644 --- a/galleries/examples/text_labels_and_annotations/annotation_polar.py +++ b/galleries/examples/text_labels_and_annotations/annotation_polar.py @@ -1,7 +1,7 @@ """ -================ -Annotation Polar -================ +==================== +Annotate polar plots +==================== This example shows how to create an annotation on a polar graph. diff --git a/galleries/examples/text_labels_and_annotations/custom_legends.py b/galleries/examples/text_labels_and_annotations/custom_legends.py index 18ace0513228..80200c528224 100644 --- a/galleries/examples/text_labels_and_annotations/custom_legends.py +++ b/galleries/examples/text_labels_and_annotations/custom_legends.py @@ -1,7 +1,7 @@ """ -======================== -Composing Custom Legends -======================== +====================== +Compose custom legends +====================== Composing custom legends piece-by-piece. diff --git a/galleries/examples/text_labels_and_annotations/demo_text_rotation_mode.py b/galleries/examples/text_labels_and_annotations/demo_text_rotation_mode.py index f8f3a108629c..9cb7f30302fc 100644 --- a/galleries/examples/text_labels_and_annotations/demo_text_rotation_mode.py +++ b/galleries/examples/text_labels_and_annotations/demo_text_rotation_mode.py @@ -1,6 +1,6 @@ r""" ================== -Text Rotation Mode +Text rotation mode ================== This example illustrates the effect of ``rotation_mode`` on the positioning diff --git a/galleries/examples/text_labels_and_annotations/mathtext_examples.py b/galleries/examples/text_labels_and_annotations/mathtext_examples.py index 0cdae3c8193c..f9f8e628e08b 100644 --- a/galleries/examples/text_labels_and_annotations/mathtext_examples.py +++ b/galleries/examples/text_labels_and_annotations/mathtext_examples.py @@ -1,7 +1,7 @@ """ -================= -Mathtext Examples -================= +======================== +Mathematical expressions +======================== Selected features of Matplotlib's math rendering engine. """ diff --git a/galleries/examples/text_labels_and_annotations/text_commands.py b/galleries/examples/text_labels_and_annotations/text_commands.py index 35f2c1c1a0c4..0650ff53bd5d 100644 --- a/galleries/examples/text_labels_and_annotations/text_commands.py +++ b/galleries/examples/text_labels_and_annotations/text_commands.py @@ -1,7 +1,7 @@ """ -============= -Text Commands -============= +=============== +Text properties +=============== Plotting text of many different kinds. diff --git a/galleries/examples/text_labels_and_annotations/text_rotation_relative_to_line.py b/galleries/examples/text_labels_and_annotations/text_rotation_relative_to_line.py index 4672f5c5772d..ae29385e8a6d 100644 --- a/galleries/examples/text_labels_and_annotations/text_rotation_relative_to_line.py +++ b/galleries/examples/text_labels_and_annotations/text_rotation_relative_to_line.py @@ -1,7 +1,7 @@ """ -============================== -Text Rotation Relative To Line -============================== +======================================= +Text rotation angle in data coordinates +======================================= Text objects in matplotlib are normally rotated with respect to the screen coordinate system (i.e., 45 degrees rotation plots text along a diff --git a/galleries/examples/text_labels_and_annotations/usetex_baseline_test.py b/galleries/examples/text_labels_and_annotations/usetex_baseline_test.py index 49303e244821..e529b1c8b2de 100644 --- a/galleries/examples/text_labels_and_annotations/usetex_baseline_test.py +++ b/galleries/examples/text_labels_and_annotations/usetex_baseline_test.py @@ -1,6 +1,6 @@ """ ==================== -Usetex Baseline Test +Usetex text baseline ==================== Comparison of text baselines computed for mathtext and usetex. diff --git a/galleries/examples/ticks/date_precision_and_epochs.py b/galleries/examples/ticks/date_precision_and_epochs.py index c4b87127d3c0..eb4926cab68d 100644 --- a/galleries/examples/ticks/date_precision_and_epochs.py +++ b/galleries/examples/ticks/date_precision_and_epochs.py @@ -1,6 +1,6 @@ """ ========================= -Date Precision and Epochs +Date precision and epochs ========================= Matplotlib can handle `.datetime` objects and `numpy.datetime64` objects using diff --git a/galleries/examples/units/units_sample.py b/galleries/examples/units/units_sample.py index 5c1d53fa2dee..2690ee7db727 100644 --- a/galleries/examples/units/units_sample.py +++ b/galleries/examples/units/units_sample.py @@ -1,6 +1,6 @@ """ ====================== -Inches and Centimeters +Inches and centimeters ====================== The example illustrates the ability to override default x and y units (ax1) to diff --git a/galleries/examples/widgets/range_slider.py b/galleries/examples/widgets/range_slider.py index 1ae40c9841fe..f1bed7431e39 100644 --- a/galleries/examples/widgets/range_slider.py +++ b/galleries/examples/widgets/range_slider.py @@ -1,7 +1,7 @@ """ -====================================== -Thresholding an Image with RangeSlider -====================================== +================================= +Image scaling using a RangeSlider +================================= Using the RangeSlider widget to control the thresholding of an image.