From a4e9e0749872946bcbd85390417ca1d2feb863b0 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 2 Aug 2024 00:10:53 +0200 Subject: [PATCH] DOC: Standardize example titles - part 2 Follow up to #28544. As there: Following recommendations from #28527, this improves example titles. Take this as an incremental improvement. I've changed what I saw t 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 | 6 +++--- galleries/examples/axes_grid1/demo_axes_rgb.py | 6 +++--- .../demo_colorbar_with_inset_locator.py | 6 +++--- .../examples/axes_grid1/demo_imagegrid_aspect.py | 2 +- galleries/examples/color/custom_cmap.py | 6 +++--- .../image_annotated_heatmap.py | 6 +++--- .../examples/lines_bars_and_markers/bar_colors.py | 6 +++--- .../lines_bars_and_markers/fill_between_alpha.py | 6 +++--- .../lines_bars_and_markers/fill_between_demo.py | 6 +++--- .../lines_bars_and_markers/fill_betweenx_demo.py | 6 +++--- .../line_demo_dash_control.py | 6 +++--- .../lines_bars_and_markers/scatter_masked.py | 6 +++--- .../lines_bars_and_markers/scatter_with_legend.py | 6 +++--- .../examples/lines_bars_and_markers/timeline.py | 6 +++--- galleries/examples/misc/bbox_intersect.py | 6 +++--- galleries/examples/misc/demo_ribbon_box.py | 2 +- galleries/examples/misc/fig_x.py | 15 ++++++++------- galleries/examples/misc/fill_spiral.py | 2 +- .../pie_and_polar_charts/pie_and_donut_labels.py | 6 +++--- .../shapes_and_collections/line_collection.py | 6 +++--- .../examples/statistics/errorbars_and_boxes.py | 6 +++--- .../examples/statistics/histogram_cumulative.py | 6 +++--- .../multiple_histograms_side_by_side.py | 6 +++--- .../auto_subplots_adjust.py | 6 +++--- .../subplots_axes_and_figures/axhspan_demo.py | 6 +++--- .../demo_constrained_layout.py | 6 +++--- .../demo_tight_layout.py | 6 +++--- .../subplots_axes_and_figures/ganged_plots.py | 6 +++--- .../gridspec_and_subplots.py | 6 +++--- .../gridspec_multicolumn.py | 6 +++--- .../multiple_figs_demo.py | 6 +++--- .../share_axis_lims_views.py | 5 +++-- .../subplots_axes_and_figures/subplots_demo.py | 6 +++--- .../text_labels_and_annotations/autowrap.py | 10 +++++----- .../engineering_formatter.py | 6 +++--- .../text_labels_and_annotations/font_family_rc.py | 6 +++--- .../text_labels_and_annotations/rainbow_text.py | 6 +++--- .../text_labels_and_annotations/tex_demo.py | 6 +++--- .../usetex_fonteffects.py | 6 +++--- galleries/examples/ticks/centered_ticklabels.py | 6 +++--- .../examples/ticks/date_concise_formatter.py | 6 +++--- galleries/examples/ticks/ticklabels_rotation.py | 6 +++--- galleries/examples/units/basic_units.py | 2 +- .../embedding_in_gtk3_panzoom_sgskip.py | 8 ++++---- .../user_interfaces/embedding_in_gtk3_sgskip.py | 8 ++++---- .../embedding_in_gtk4_panzoom_sgskip.py | 8 ++++---- .../user_interfaces/embedding_in_gtk4_sgskip.py | 8 ++++---- .../user_interfaces/embedding_in_qt_sgskip.py | 6 +++--- .../user_interfaces/embedding_in_tk_sgskip.py | 8 ++++---- .../user_interfaces/embedding_in_wx2_sgskip.py | 6 +++--- .../user_interfaces/embedding_in_wx3_sgskip.py | 6 +++--- .../user_interfaces/embedding_in_wx4_sgskip.py | 6 +++--- .../user_interfaces/embedding_in_wx5_sgskip.py | 6 +++--- .../web_application_server_sgskip.py | 6 +++--- .../user_interfaces/wxcursor_demo_sgskip.py | 6 +++--- galleries/examples/widgets/slider_snap_demo.py | 6 +++--- 56 files changed, 172 insertions(+), 170 deletions(-) diff --git a/galleries/examples/animation/pause_resume.py b/galleries/examples/animation/pause_resume.py index 13de31f36f89..e62dd049e11f 100644 --- a/galleries/examples/animation/pause_resume.py +++ b/galleries/examples/animation/pause_resume.py @@ -1,7 +1,7 @@ """ -================================= -Pausing and resuming an animation -================================= +============================= +Pause and resume an animation +============================= This example showcases: diff --git a/galleries/examples/axes_grid1/demo_axes_rgb.py b/galleries/examples/axes_grid1/demo_axes_rgb.py index ecbe1b89fd72..2cdb41fc323b 100644 --- a/galleries/examples/axes_grid1/demo_axes_rgb.py +++ b/galleries/examples/axes_grid1/demo_axes_rgb.py @@ -1,7 +1,7 @@ """ -================================== -Showing RGB channels using RGBAxes -================================== +=============================== +Show RGB channels using RGBAxes +=============================== `~.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 diff --git a/galleries/examples/axes_grid1/demo_colorbar_with_inset_locator.py b/galleries/examples/axes_grid1/demo_colorbar_with_inset_locator.py index d989fb44bbab..f62a0f58e3bc 100644 --- a/galleries/examples/axes_grid1/demo_colorbar_with_inset_locator.py +++ b/galleries/examples/axes_grid1/demo_colorbar_with_inset_locator.py @@ -1,9 +1,9 @@ """ .. _demo-colorbar-with-inset-locator: -============================================================== -Controlling the position and size of colorbars with Inset Axes -============================================================== +=========================================================== +Control the position and size of a colorbar with Inset Axes +=========================================================== This example shows how to control the position, height, and width of colorbars using `~mpl_toolkits.axes_grid1.inset_locator.inset_axes`. diff --git a/galleries/examples/axes_grid1/demo_imagegrid_aspect.py b/galleries/examples/axes_grid1/demo_imagegrid_aspect.py index 820a2e8e1d2d..55268c41c9b1 100644 --- a/galleries/examples/axes_grid1/demo_imagegrid_aspect.py +++ b/galleries/examples/axes_grid1/demo_imagegrid_aspect.py @@ -1,6 +1,6 @@ """ ========================================= -Setting a fixed aspect on ImageGrid cells +ImageGrid cells with a fixed aspect ratio ========================================= """ diff --git a/galleries/examples/color/custom_cmap.py b/galleries/examples/color/custom_cmap.py index 667dc3133819..0a73b0c3135a 100644 --- a/galleries/examples/color/custom_cmap.py +++ b/galleries/examples/color/custom_cmap.py @@ -1,7 +1,7 @@ """ -========================================= -Creating a colormap from a list of colors -========================================= +======================================= +Create a colormap from a list of colors +======================================= For more detail on creating and manipulating colormaps see :ref:`colormap-manipulation`. diff --git a/galleries/examples/images_contours_and_fields/image_annotated_heatmap.py b/galleries/examples/images_contours_and_fields/image_annotated_heatmap.py index 23d9fd48dff8..7bd9df2750f4 100644 --- a/galleries/examples/images_contours_and_fields/image_annotated_heatmap.py +++ b/galleries/examples/images_contours_and_fields/image_annotated_heatmap.py @@ -1,7 +1,7 @@ """ -=========================== -Creating annotated heatmaps -=========================== +================= +Annotated heatmap +================= It is often desirable to show data which depends on two independent variables as a color coded image plot. This is often referred to as a diff --git a/galleries/examples/lines_bars_and_markers/bar_colors.py b/galleries/examples/lines_bars_and_markers/bar_colors.py index 35e7a64ef605..f173b50c0672 100644 --- a/galleries/examples/lines_bars_and_markers/bar_colors.py +++ b/galleries/examples/lines_bars_and_markers/bar_colors.py @@ -1,7 +1,7 @@ """ -============== -Bar color demo -============== +==================================== +Bar chart with individual bar colors +==================================== This is an example showing how to control bar color and legend entries using the *color* and *label* parameters of `~matplotlib.pyplot.bar`. 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 2887310378d1..1dadc4309e2e 100644 --- a/galleries/examples/lines_bars_and_markers/fill_between_alpha.py +++ b/galleries/examples/lines_bars_and_markers/fill_between_alpha.py @@ -1,7 +1,7 @@ """ -============================== -Fill Between with transparency -============================== +================================== +``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/fill_between_demo.py b/galleries/examples/lines_bars_and_markers/fill_between_demo.py index 656a8695ba18..5afdd722360f 100644 --- a/galleries/examples/lines_bars_and_markers/fill_between_demo.py +++ b/galleries/examples/lines_bars_and_markers/fill_between_demo.py @@ -1,7 +1,7 @@ """ -============================== -Filling the area between lines -============================== +=============================== +Fill the area between two lines +=============================== This example shows how to use `~.axes.Axes.fill_between` to color the area between two lines. diff --git a/galleries/examples/lines_bars_and_markers/fill_betweenx_demo.py b/galleries/examples/lines_bars_and_markers/fill_betweenx_demo.py index b311db42af85..472f42fdbfc4 100644 --- a/galleries/examples/lines_bars_and_markers/fill_betweenx_demo.py +++ b/galleries/examples/lines_bars_and_markers/fill_betweenx_demo.py @@ -1,7 +1,7 @@ """ -================== -Fill Betweenx Demo -================== +======================================== +Fill the area between two vertical lines +======================================== Using `~.Axes.fill_betweenx` to color along the horizontal direction between two curves. diff --git a/galleries/examples/lines_bars_and_markers/line_demo_dash_control.py b/galleries/examples/lines_bars_and_markers/line_demo_dash_control.py index c695bc51c176..5952809125de 100644 --- a/galleries/examples/lines_bars_and_markers/line_demo_dash_control.py +++ b/galleries/examples/lines_bars_and_markers/line_demo_dash_control.py @@ -1,7 +1,7 @@ """ -============================== -Customizing dashed line styles -============================== +=============================== +Dashed line style configuration +=============================== The dashing of a line is controlled via a dash sequence. It can be modified using `.Line2D.set_dashes`. diff --git a/galleries/examples/lines_bars_and_markers/scatter_masked.py b/galleries/examples/lines_bars_and_markers/scatter_masked.py index c8e603e6f3b0..2bf6e03a46d0 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 with masked values -========================== +=============================== +Scatter plot with masked values +=============================== Mask some data points and add a line demarking masked regions. diff --git a/galleries/examples/lines_bars_and_markers/scatter_with_legend.py b/galleries/examples/lines_bars_and_markers/scatter_with_legend.py index 786ffff18807..5241e3ef1508 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_with_legend.py +++ b/galleries/examples/lines_bars_and_markers/scatter_with_legend.py @@ -1,7 +1,7 @@ """ -=========================== -Scatter plots with a legend -=========================== +========================== +Scatter plot with a legend +========================== To create a scatter plot with a legend one may use a loop and create one `~.Axes.scatter` plot per item to appear in the legend and set the ``label`` diff --git a/galleries/examples/lines_bars_and_markers/timeline.py b/galleries/examples/lines_bars_and_markers/timeline.py index ef84515aedf1..b7f8ec57b1cc 100644 --- a/galleries/examples/lines_bars_and_markers/timeline.py +++ b/galleries/examples/lines_bars_and_markers/timeline.py @@ -1,7 +1,7 @@ """ -=============================================== -Creating a timeline with lines, dates, and text -=============================================== +==================================== +Timeline with lines, dates, and text +==================================== How to create a simple timeline using Matplotlib release dates. diff --git a/galleries/examples/misc/bbox_intersect.py b/galleries/examples/misc/bbox_intersect.py index c645cd34c155..9103705537d5 100644 --- a/galleries/examples/misc/bbox_intersect.py +++ b/galleries/examples/misc/bbox_intersect.py @@ -1,7 +1,7 @@ """ -=========================================== -Changing colors of lines intersecting a box -=========================================== +================================== +Identify whether artists intersect +================================== The lines intersecting the rectangle are colored in red, while the others are left as blue lines. This example showcases the `.intersects_bbox` function. diff --git a/galleries/examples/misc/demo_ribbon_box.py b/galleries/examples/misc/demo_ribbon_box.py index d5121ba6ff5c..5400a2a0063e 100644 --- a/galleries/examples/misc/demo_ribbon_box.py +++ b/galleries/examples/misc/demo_ribbon_box.py @@ -1,6 +1,6 @@ """ ========== -Ribbon Box +Ribbon box ========== """ diff --git a/galleries/examples/misc/fig_x.py b/galleries/examples/misc/fig_x.py index e2af3e766028..593a7e8f8aa5 100644 --- a/galleries/examples/misc/fig_x.py +++ b/galleries/examples/misc/fig_x.py @@ -1,9 +1,10 @@ """ -======================= -Adding lines to figures -======================= +============================== +Add lines directly to a figure +============================== -Adding lines to a figure without any Axes. +You can add artists such as a `.Line2D` directly to a figure. This is +typically useful for visual structuring. .. redirect-from:: /gallery/pyplots/fig_x """ @@ -12,9 +13,9 @@ import matplotlib.lines as lines -fig = plt.figure() -fig.add_artist(lines.Line2D([0, 1], [0, 1])) -fig.add_artist(lines.Line2D([0, 1], [1, 0])) +fig, axs = plt.subplots(2, 2, gridspec_kw={'hspace': 0.4, 'wspace': 0.4}) +fig.add_artist(lines.Line2D([0, 1], [0.47, 0.47], linewidth=3)) +fig.add_artist(lines.Line2D([0.5, 0.5], [1, 0], linewidth=3)) plt.show() # %% diff --git a/galleries/examples/misc/fill_spiral.py b/galleries/examples/misc/fill_spiral.py index e82f0203e39f..35b06886e985 100644 --- a/galleries/examples/misc/fill_spiral.py +++ b/galleries/examples/misc/fill_spiral.py @@ -1,6 +1,6 @@ """ =========== -Fill Spiral +Fill spiral =========== """ diff --git a/galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py b/galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py index ae9b805cf005..7f945d1056f4 100644 --- a/galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py +++ b/galleries/examples/pie_and_polar_charts/pie_and_donut_labels.py @@ -1,7 +1,7 @@ """ -========================== -Labeling a pie and a donut -========================== +============================= +A pie and a donut with labels +============================= Welcome to the Matplotlib bakery. We will create a pie and a donut chart through the `pie method ` and diff --git a/galleries/examples/shapes_and_collections/line_collection.py b/galleries/examples/shapes_and_collections/line_collection.py index a27496f62e0e..d8b3fd655133 100644 --- a/galleries/examples/shapes_and_collections/line_collection.py +++ b/galleries/examples/shapes_and_collections/line_collection.py @@ -1,7 +1,7 @@ """ -============================================= -Plotting multiple lines with a LineCollection -============================================= +========================================== +Plot multiple lines using a LineCollection +========================================== Matplotlib can efficiently draw multiple lines at once using a `~.LineCollection`. """ diff --git a/galleries/examples/statistics/errorbars_and_boxes.py b/galleries/examples/statistics/errorbars_and_boxes.py index 54c8786096c7..886cd7a17c88 100644 --- a/galleries/examples/statistics/errorbars_and_boxes.py +++ b/galleries/examples/statistics/errorbars_and_boxes.py @@ -1,7 +1,7 @@ """ -==================================================== -Creating boxes from error bars using PatchCollection -==================================================== +================================================== +Create boxes from error bars using PatchCollection +================================================== In this example, we snazz up a pretty standard error bar plot by adding a rectangle patch defined by the limits of the bars in both the x- and diff --git a/galleries/examples/statistics/histogram_cumulative.py b/galleries/examples/statistics/histogram_cumulative.py index 9ce16568d126..8a2aaa5a707e 100644 --- a/galleries/examples/statistics/histogram_cumulative.py +++ b/galleries/examples/statistics/histogram_cumulative.py @@ -1,7 +1,7 @@ """ -================================= -Plotting cumulative distributions -================================= +======================== +Cumulative distributions +======================== This example shows how to plot the empirical cumulative distribution function (ECDF) of a sample. We also show the theoretical CDF. diff --git a/galleries/examples/statistics/multiple_histograms_side_by_side.py b/galleries/examples/statistics/multiple_histograms_side_by_side.py index 3c5766f8e546..ecb3623fb437 100644 --- a/galleries/examples/statistics/multiple_histograms_side_by_side.py +++ b/galleries/examples/statistics/multiple_histograms_side_by_side.py @@ -1,7 +1,7 @@ """ -========================================== -Producing multiple histograms side by side -========================================== +================================ +Multiple histograms side by side +================================ This example plots horizontal histograms of different samples along a categorical x-axis. Additionally, the histograms are plotted to diff --git a/galleries/examples/subplots_axes_and_figures/auto_subplots_adjust.py b/galleries/examples/subplots_axes_and_figures/auto_subplots_adjust.py index e0a8c76a0e61..983a47e4e42c 100644 --- a/galleries/examples/subplots_axes_and_figures/auto_subplots_adjust.py +++ b/galleries/examples/subplots_axes_and_figures/auto_subplots_adjust.py @@ -1,7 +1,7 @@ """ -=============================================== -Programmatically controlling subplot adjustment -=============================================== +=========================================== +Programmatically control subplot adjustment +=========================================== .. note:: diff --git a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py index 934345ceca18..788030fcc5f3 100644 --- a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py @@ -1,7 +1,7 @@ """ -================================= -Drawing regions that span an Axes -================================= +============================== +Draw regions that span an Axes +============================== `~.Axes.axhspan` and `~.Axes.axvspan` draw rectangles that span the Axes in either the horizontal or vertical direction and are bounded in the other direction. They are diff --git a/galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py b/galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py index 9a67541e554e..67891cfed611 100644 --- a/galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py +++ b/galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py @@ -1,7 +1,7 @@ """ -===================================== -Resizing Axes with constrained layout -===================================== +=================================== +Resize Axes with constrained layout +=================================== *Constrained layout* attempts to resize subplots in a figure so that there are no overlaps between Axes objects and labels diff --git a/galleries/examples/subplots_axes_and_figures/demo_tight_layout.py b/galleries/examples/subplots_axes_and_figures/demo_tight_layout.py index 7ac3a7376d67..a8d7524697ea 100644 --- a/galleries/examples/subplots_axes_and_figures/demo_tight_layout.py +++ b/galleries/examples/subplots_axes_and_figures/demo_tight_layout.py @@ -1,7 +1,7 @@ """ -=============================== -Resizing Axes with tight layout -=============================== +============================= +Resize Axes with tight layout +============================= `~.Figure.tight_layout` attempts to resize subplots in a figure so that there are no overlaps between Axes objects and labels on the Axes. diff --git a/galleries/examples/subplots_axes_and_figures/ganged_plots.py b/galleries/examples/subplots_axes_and_figures/ganged_plots.py index e25bb16a15e5..d2f50fe2e986 100644 --- a/galleries/examples/subplots_axes_and_figures/ganged_plots.py +++ b/galleries/examples/subplots_axes_and_figures/ganged_plots.py @@ -1,7 +1,7 @@ """ -========================== -Creating adjacent subplots -========================== +================= +Adjacent subplots +================= To create plots that share a common axis (visually) you can set the hspace between the subplots to zero. Passing sharex=True when creating the subplots diff --git a/galleries/examples/subplots_axes_and_figures/gridspec_and_subplots.py b/galleries/examples/subplots_axes_and_figures/gridspec_and_subplots.py index 0535a7afdde4..cfe5b123e897 100644 --- a/galleries/examples/subplots_axes_and_figures/gridspec_and_subplots.py +++ b/galleries/examples/subplots_axes_and_figures/gridspec_and_subplots.py @@ -1,7 +1,7 @@ """ -================================================== -Combining two subplots using subplots and GridSpec -================================================== +================================================ +Combine two subplots using subplots and GridSpec +================================================ Sometimes we want to combine two subplots in an Axes layout created with `~.Figure.subplots`. We can get the `~.gridspec.GridSpec` from the Axes diff --git a/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py b/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py index 54c3d8fa63cc..a7fa34a10367 100644 --- a/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py +++ b/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py @@ -1,7 +1,7 @@ """ -======================================================= -Using Gridspec to make multi-column/row subplot layouts -======================================================= +============================================= +Gridspec for multi-column/row subplot layouts +============================================= `.GridSpec` is a flexible way to layout subplot grids. Here is an example with a 3x3 grid, and diff --git a/galleries/examples/subplots_axes_and_figures/multiple_figs_demo.py b/galleries/examples/subplots_axes_and_figures/multiple_figs_demo.py index d6b6a5ed48c6..fe3b2ab191a1 100644 --- a/galleries/examples/subplots_axes_and_figures/multiple_figs_demo.py +++ b/galleries/examples/subplots_axes_and_figures/multiple_figs_demo.py @@ -1,7 +1,7 @@ """ -=================================== -Managing multiple figures in pyplot -=================================== +================================= +Manage multiple figures in pyplot +================================= `matplotlib.pyplot` uses the concept of a *current figure* and *current Axes*. Figures are identified via a figure number that is passed to `~.pyplot.figure`. diff --git a/galleries/examples/subplots_axes_and_figures/share_axis_lims_views.py b/galleries/examples/subplots_axes_and_figures/share_axis_lims_views.py index 234a15660f2d..f8073b2c3c31 100644 --- a/galleries/examples/subplots_axes_and_figures/share_axis_lims_views.py +++ b/galleries/examples/subplots_axes_and_figures/share_axis_lims_views.py @@ -1,6 +1,7 @@ """ -Sharing axis limits and views -============================= +=========================== +Share axis limits and views +=========================== It's common to make two or more plots which share an axis, e.g., two subplots with time as a common axis. When you pan and zoom around on one, you want the diff --git a/galleries/examples/subplots_axes_and_figures/subplots_demo.py b/galleries/examples/subplots_axes_and_figures/subplots_demo.py index 229ecd34cc9f..afc71c795365 100644 --- a/galleries/examples/subplots_axes_and_figures/subplots_demo.py +++ b/galleries/examples/subplots_axes_and_figures/subplots_demo.py @@ -1,7 +1,7 @@ """ -================================================= -Creating multiple subplots using ``plt.subplots`` -================================================= +=============================================== +Create multiple subplots using ``plt.subplots`` +=============================================== `.pyplot.subplots` creates a figure and a grid of subplots with a single call, while providing reasonable control over how the individual plots are created. diff --git a/galleries/examples/text_labels_and_annotations/autowrap.py b/galleries/examples/text_labels_and_annotations/autowrap.py index e52dc919ee1b..ea65b0be9992 100644 --- a/galleries/examples/text_labels_and_annotations/autowrap.py +++ b/galleries/examples/text_labels_and_annotations/autowrap.py @@ -1,10 +1,10 @@ """ -================== -Auto-wrapping text -================== +============== +Auto-wrap text +============== -Matplotlib can wrap text automatically, but if it's too long, the text will be -displayed slightly outside of the boundaries of the axis anyways. +Matplotlib can wrap text automatically, but if it's too long, the text will +still be displayed slightly outside the boundaries of the axis. Note: Auto-wrapping does not work together with ``savefig(..., bbox_inches='tight')``. The 'tight' setting rescales the canvas diff --git a/galleries/examples/text_labels_and_annotations/engineering_formatter.py b/galleries/examples/text_labels_and_annotations/engineering_formatter.py index 573552b11a26..372297a81d57 100644 --- a/galleries/examples/text_labels_and_annotations/engineering_formatter.py +++ b/galleries/examples/text_labels_and_annotations/engineering_formatter.py @@ -1,7 +1,7 @@ """ -========================================= -Labeling ticks using engineering notation -========================================= +======================================= +Format ticks using engineering notation +======================================= Use of the engineering Formatter. """ diff --git a/galleries/examples/text_labels_and_annotations/font_family_rc.py b/galleries/examples/text_labels_and_annotations/font_family_rc.py index b3433dc9cdf1..bdf993b76a9e 100644 --- a/galleries/examples/text_labels_and_annotations/font_family_rc.py +++ b/galleries/examples/text_labels_and_annotations/font_family_rc.py @@ -1,7 +1,7 @@ """ -=========================== -Configuring the font family -=========================== +========================= +Configure the font family +========================= You can explicitly set which font family is picked up, either by specifying family names of fonts installed on user's system, or generic-families diff --git a/galleries/examples/text_labels_and_annotations/rainbow_text.py b/galleries/examples/text_labels_and_annotations/rainbow_text.py index 35cedb9bbd0b..4c14f8289cbc 100644 --- a/galleries/examples/text_labels_and_annotations/rainbow_text.py +++ b/galleries/examples/text_labels_and_annotations/rainbow_text.py @@ -1,7 +1,7 @@ """ -==================================================== -Concatenating text objects with different properties -==================================================== +================================================== +Concatenate text objects with different properties +================================================== The example strings together several Text objects with different properties (e.g., color or font), positioning each one after the other. The first Text diff --git a/galleries/examples/text_labels_and_annotations/tex_demo.py b/galleries/examples/text_labels_and_annotations/tex_demo.py index 5eba9a14c2b7..df040c5a866a 100644 --- a/galleries/examples/text_labels_and_annotations/tex_demo.py +++ b/galleries/examples/text_labels_and_annotations/tex_demo.py @@ -1,7 +1,7 @@ """ -================================== -Rendering math equations using TeX -================================== +=============================== +Render math equations using TeX +=============================== You can use TeX to render all of your Matplotlib text by setting :rc:`text.usetex` to True. This requires that you have TeX and the other diff --git a/galleries/examples/text_labels_and_annotations/usetex_fonteffects.py b/galleries/examples/text_labels_and_annotations/usetex_fonteffects.py index a289f3854ed7..ba1c944536cb 100644 --- a/galleries/examples/text_labels_and_annotations/usetex_fonteffects.py +++ b/galleries/examples/text_labels_and_annotations/usetex_fonteffects.py @@ -1,7 +1,7 @@ """ -================== -Usetex Fonteffects -================== +=================== +Usetex font effects +=================== This script demonstrates that font effects specified in your pdftex.map are now supported in usetex mode. diff --git a/galleries/examples/ticks/centered_ticklabels.py b/galleries/examples/ticks/centered_ticklabels.py index ab9e1b56c4e6..c3ccd67b0f5c 100644 --- a/galleries/examples/ticks/centered_ticklabels.py +++ b/galleries/examples/ticks/centered_ticklabels.py @@ -1,7 +1,7 @@ """ -============================== -Centering labels between ticks -============================== +=========================== +Center labels between ticks +=========================== Ticklabels are aligned relative to their associated tick. The alignment 'center', 'left', or 'right' can be controlled using the horizontal alignment diff --git a/galleries/examples/ticks/date_concise_formatter.py b/galleries/examples/ticks/date_concise_formatter.py index 540ebf0e56c1..ce5372aa9547 100644 --- a/galleries/examples/ticks/date_concise_formatter.py +++ b/galleries/examples/ticks/date_concise_formatter.py @@ -1,9 +1,9 @@ """ .. _date_concise_formatter: -================================================ -Formatting date ticks using ConciseDateFormatter -================================================ +============================================ +Format date ticks using ConciseDateFormatter +============================================ Finding good tick values and formatting the ticks for an axis that has date data is often a challenge. `~.dates.ConciseDateFormatter` is diff --git a/galleries/examples/ticks/ticklabels_rotation.py b/galleries/examples/ticks/ticklabels_rotation.py index 5e21b9a352f0..d337ca827cde 100644 --- a/galleries/examples/ticks/ticklabels_rotation.py +++ b/galleries/examples/ticks/ticklabels_rotation.py @@ -1,7 +1,7 @@ """ -==================== -Rotating tick labels -==================== +=================== +Rotated tick labels +=================== """ import matplotlib.pyplot as plt diff --git a/galleries/examples/units/basic_units.py b/galleries/examples/units/basic_units.py index d6f788c20fd9..3f64d145b65e 100644 --- a/galleries/examples/units/basic_units.py +++ b/galleries/examples/units/basic_units.py @@ -2,7 +2,7 @@ .. _basic_units: =========== -Basic Units +Basic units =========== """ diff --git a/galleries/examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py b/galleries/examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py index f6892a849a88..7c3b04041009 100644 --- a/galleries/examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_gtk3_panzoom_sgskip.py @@ -1,7 +1,7 @@ """ -=========================================== -Embedding in GTK3 with a navigation toolbar -=========================================== +======================================= +Embed in GTK3 with a navigation toolbar +======================================= Demonstrate NavigationToolbar with GTK3 accessed via pygobject. """ @@ -22,7 +22,7 @@ win = Gtk.Window() win.connect("delete-event", Gtk.main_quit) win.set_default_size(400, 300) -win.set_title("Embedding in GTK3") +win.set_title("Embedded in GTK3") fig = Figure(figsize=(5, 4), dpi=100) ax = fig.add_subplot(1, 1, 1) diff --git a/galleries/examples/user_interfaces/embedding_in_gtk3_sgskip.py b/galleries/examples/user_interfaces/embedding_in_gtk3_sgskip.py index 170a88a58aff..51ceebb501e3 100644 --- a/galleries/examples/user_interfaces/embedding_in_gtk3_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_gtk3_sgskip.py @@ -1,7 +1,7 @@ """ -================= -Embedding in GTK3 -================= +============= +Embed in GTK3 +============= Demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow using GTK3 accessed via pygobject. @@ -21,7 +21,7 @@ win = Gtk.Window() win.connect("delete-event", Gtk.main_quit) win.set_default_size(400, 300) -win.set_title("Embedding in GTK3") +win.set_title("Embedded in GTK3") fig = Figure(figsize=(5, 4), dpi=100) ax = fig.add_subplot() diff --git a/galleries/examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py b/galleries/examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py index 3e8568091236..e42e59459198 100644 --- a/galleries/examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_gtk4_panzoom_sgskip.py @@ -1,7 +1,7 @@ """ -=========================================== -Embedding in GTK4 with a navigation toolbar -=========================================== +======================================= +Embed in GTK4 with a navigation toolbar +======================================= Demonstrate NavigationToolbar with GTK4 accessed via pygobject. """ @@ -23,7 +23,7 @@ def on_activate(app): win = Gtk.ApplicationWindow(application=app) win.set_default_size(400, 300) - win.set_title("Embedding in GTK4") + win.set_title("Embedded in GTK4") fig = Figure(figsize=(5, 4), dpi=100) ax = fig.add_subplot(1, 1, 1) diff --git a/galleries/examples/user_interfaces/embedding_in_gtk4_sgskip.py b/galleries/examples/user_interfaces/embedding_in_gtk4_sgskip.py index 0e17473de5d3..197cd7971088 100644 --- a/galleries/examples/user_interfaces/embedding_in_gtk4_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_gtk4_sgskip.py @@ -1,7 +1,7 @@ """ -================= -Embedding in GTK4 -================= +============= +Embed in GTK4 +============= Demonstrate adding a FigureCanvasGTK4Agg widget to a Gtk.ScrolledWindow using GTK4 accessed via pygobject. @@ -22,7 +22,7 @@ def on_activate(app): win = Gtk.ApplicationWindow(application=app) win.set_default_size(400, 300) - win.set_title("Embedding in GTK4") + win.set_title("Embedded in GTK4") fig = Figure(figsize=(5, 4), dpi=100) ax = fig.add_subplot() diff --git a/galleries/examples/user_interfaces/embedding_in_qt_sgskip.py b/galleries/examples/user_interfaces/embedding_in_qt_sgskip.py index b79f582a65e4..f061efc79ec2 100644 --- a/galleries/examples/user_interfaces/embedding_in_qt_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_qt_sgskip.py @@ -1,7 +1,7 @@ """ -=============== -Embedding in Qt -=============== +=========== +Embed in Qt +=========== Simple Qt application embedding Matplotlib canvases. This program will work equally well using any Qt binding (PyQt6, PySide6, PyQt5, PySide2). The diff --git a/galleries/examples/user_interfaces/embedding_in_tk_sgskip.py b/galleries/examples/user_interfaces/embedding_in_tk_sgskip.py index e5c4aa4125b6..7474f40b4bac 100644 --- a/galleries/examples/user_interfaces/embedding_in_tk_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_tk_sgskip.py @@ -1,7 +1,7 @@ """ -=============== -Embedding in Tk -=============== +=========== +Embed in Tk +=========== """ @@ -16,7 +16,7 @@ from matplotlib.figure import Figure root = tkinter.Tk() -root.wm_title("Embedding in Tk") +root.wm_title("Embedded in Tk") fig = Figure(figsize=(5, 4), dpi=100) t = np.arange(0, 3, .01) diff --git a/galleries/examples/user_interfaces/embedding_in_wx2_sgskip.py b/galleries/examples/user_interfaces/embedding_in_wx2_sgskip.py index acfe1bc9d98f..634d8c511aa7 100644 --- a/galleries/examples/user_interfaces/embedding_in_wx2_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_wx2_sgskip.py @@ -1,7 +1,7 @@ """ -================== -Embedding in wx #2 -================== +============== +Embed in wx #2 +============== An example of how to use wxagg in an application with the new toolbar - comment out the add_toolbar line for no toolbar. diff --git a/galleries/examples/user_interfaces/embedding_in_wx3_sgskip.py b/galleries/examples/user_interfaces/embedding_in_wx3_sgskip.py index 40282699d872..ac1213be0576 100644 --- a/galleries/examples/user_interfaces/embedding_in_wx3_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_wx3_sgskip.py @@ -1,7 +1,7 @@ """ -================== -Embedding in wx #3 -================== +============== +Embed in wx #3 +============== Copyright (C) 2003-2004 Andrew Straw, Jeremy O'Donoghue and others diff --git a/galleries/examples/user_interfaces/embedding_in_wx4_sgskip.py b/galleries/examples/user_interfaces/embedding_in_wx4_sgskip.py index b9504ff25dee..062f1219adb5 100644 --- a/galleries/examples/user_interfaces/embedding_in_wx4_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_wx4_sgskip.py @@ -1,7 +1,7 @@ """ -================== -Embedding in wx #4 -================== +============== +Embed in wx #4 +============== An example of how to use wxagg in a wx application with a custom toolbar. """ diff --git a/galleries/examples/user_interfaces/embedding_in_wx5_sgskip.py b/galleries/examples/user_interfaces/embedding_in_wx5_sgskip.py index 80062782d9fa..f150e2106ead 100644 --- a/galleries/examples/user_interfaces/embedding_in_wx5_sgskip.py +++ b/galleries/examples/user_interfaces/embedding_in_wx5_sgskip.py @@ -1,7 +1,7 @@ """ -================== -Embedding in wx #5 -================== +============== +Embed in wx #5 +============== """ diff --git a/galleries/examples/user_interfaces/web_application_server_sgskip.py b/galleries/examples/user_interfaces/web_application_server_sgskip.py index 950109015191..60c321e02eb9 100644 --- a/galleries/examples/user_interfaces/web_application_server_sgskip.py +++ b/galleries/examples/user_interfaces/web_application_server_sgskip.py @@ -1,7 +1,7 @@ """ -============================================= -Embedding in a web application server (Flask) -============================================= +========================================= +Embed in a web application server (Flask) +========================================= When using Matplotlib in a web server it is strongly recommended to not use pyplot (pyplot maintains references to the opened figures to make diff --git a/galleries/examples/user_interfaces/wxcursor_demo_sgskip.py b/galleries/examples/user_interfaces/wxcursor_demo_sgskip.py index 96c6d760dc5d..e2e7348f1c3c 100644 --- a/galleries/examples/user_interfaces/wxcursor_demo_sgskip.py +++ b/galleries/examples/user_interfaces/wxcursor_demo_sgskip.py @@ -1,7 +1,7 @@ """ -===================== -Adding a cursor in WX -===================== +================== +Add a cursor in WX +================== Example to draw a cursor and report the data coords in wx. """ diff --git a/galleries/examples/widgets/slider_snap_demo.py b/galleries/examples/widgets/slider_snap_demo.py index 23910415da8f..953ffaf63672 100644 --- a/galleries/examples/widgets/slider_snap_demo.py +++ b/galleries/examples/widgets/slider_snap_demo.py @@ -1,7 +1,7 @@ """ -=================================== -Snapping Sliders to Discrete Values -=================================== +=============================== +Snap sliders to discrete values +=============================== You can snap slider values to discrete values using the ``valstep`` argument.