From 19bbe96c7ae60e9851d3e80d3ec1cec95f02d98c Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 13 Jul 2024 14:50:50 -0400 Subject: [PATCH 1/8] Add example tags to the color examples directory --- galleries/examples/color/color_by_yvalue.py | 7 +++++++ galleries/examples/color/color_cycle_default.py | 7 +++++++ galleries/examples/color/color_demo.py | 6 ++++++ galleries/examples/color/colorbar_basics.py | 7 +++++++ galleries/examples/color/colormap_reference.py | 5 +++++ galleries/examples/color/custom_cmap.py | 6 ++++++ galleries/examples/color/individual_colors_from_cmap.py | 7 +++++++ galleries/examples/color/named_colors.py | 5 +++++ galleries/examples/color/set_alpha.py | 6 ++++++ 9 files changed, 56 insertions(+) diff --git a/galleries/examples/color/color_by_yvalue.py b/galleries/examples/color/color_by_yvalue.py index c9bee252aec4..193f840db39e 100644 --- a/galleries/examples/color/color_by_yvalue.py +++ b/galleries/examples/color/color_by_yvalue.py @@ -30,3 +30,10 @@ # in this example: # # - `matplotlib.axes.Axes.plot` / `matplotlib.pyplot.plot` +# +# .. tags:: +# +# styling: color +# styling: conditional +# plot-type: line +# level: beginner diff --git a/galleries/examples/color/color_cycle_default.py b/galleries/examples/color/color_cycle_default.py index a41ff5f63ff8..16f6634937c0 100644 --- a/galleries/examples/color/color_cycle_default.py +++ b/galleries/examples/color/color_cycle_default.py @@ -50,3 +50,10 @@ # - `matplotlib.axes.Axes.axvline` / `matplotlib.pyplot.axvline` # - `matplotlib.axes.Axes.set_facecolor` # - `matplotlib.figure.Figure.suptitle` +# +# .. tags:: +# +# styling: color +# styling: colormap +# plot-type: line +# level: beginner diff --git a/galleries/examples/color/color_demo.py b/galleries/examples/color/color_demo.py index 8c4b7756cc3e..6822efc3faa7 100644 --- a/galleries/examples/color/color_demo.py +++ b/galleries/examples/color/color_demo.py @@ -75,3 +75,9 @@ # - `matplotlib.axes.Axes.set_xlabel` # - `matplotlib.axes.Axes.set_ylabel` # - `matplotlib.axes.Axes.tick_params` +# +# .. tags:: +# +# styling: color +# plot-type: line +# level: beginner diff --git a/galleries/examples/color/colorbar_basics.py b/galleries/examples/color/colorbar_basics.py index 506789916637..8a35f8ac2b68 100644 --- a/galleries/examples/color/colorbar_basics.py +++ b/galleries/examples/color/colorbar_basics.py @@ -56,3 +56,10 @@ # - `matplotlib.figure.Figure.colorbar` / `matplotlib.pyplot.colorbar` # - `matplotlib.colorbar.Colorbar.minorticks_on` # - `matplotlib.colorbar.Colorbar.minorticks_off` +# +# .. tags:: +# +# component: colorbar +# styling: color +# plot-type: imshow +# level: beginner diff --git a/galleries/examples/color/colormap_reference.py b/galleries/examples/color/colormap_reference.py index 38e91ad25408..6f550161f2e9 100644 --- a/galleries/examples/color/colormap_reference.py +++ b/galleries/examples/color/colormap_reference.py @@ -95,3 +95,8 @@ def plot_color_gradients(cmap_category, cmap_list): # - `matplotlib.axes.Axes.imshow` # - `matplotlib.figure.Figure.text` # - `matplotlib.axes.Axes.set_axis_off` +# +# .. tags:: +# +# styling: colormap +# purpose: reference diff --git a/galleries/examples/color/custom_cmap.py b/galleries/examples/color/custom_cmap.py index 0a73b0c3135a..616ab9f279fd 100644 --- a/galleries/examples/color/custom_cmap.py +++ b/galleries/examples/color/custom_cmap.py @@ -280,3 +280,9 @@ # - `matplotlib.cm` # - `matplotlib.cm.ScalarMappable.set_cmap` # - `matplotlib.cm.ColormapRegistry.register` +# +# .. tags:: +# +# styling: colormap +# plot-type: imshow +# level: intermediate diff --git a/galleries/examples/color/individual_colors_from_cmap.py b/galleries/examples/color/individual_colors_from_cmap.py index 1a14bd6b2ae1..cdd176eb3be1 100644 --- a/galleries/examples/color/individual_colors_from_cmap.py +++ b/galleries/examples/color/individual_colors_from_cmap.py @@ -63,3 +63,10 @@ # # - `matplotlib.colors.Colormap` # - `matplotlib.colors.Colormap.resampled` +# +# .. tags:: +# +# component: colormap +# styling: color +# plot-type: line +# level: intermediate diff --git a/galleries/examples/color/named_colors.py b/galleries/examples/color/named_colors.py index d9a7259da773..a5bcf00cb0cb 100644 --- a/galleries/examples/color/named_colors.py +++ b/galleries/examples/color/named_colors.py @@ -121,3 +121,8 @@ def plot_colortable(colors, *, ncols=4, sort_colors=True): # - `matplotlib.figure.Figure.subplots_adjust` # - `matplotlib.axes.Axes.text` # - `matplotlib.patches.Rectangle` +# +# .. tags:: +# +# styling: color +# purpose: reference diff --git a/galleries/examples/color/set_alpha.py b/galleries/examples/color/set_alpha.py index 4130fe1109ef..b8ba559f5f4a 100644 --- a/galleries/examples/color/set_alpha.py +++ b/galleries/examples/color/set_alpha.py @@ -51,3 +51,9 @@ # # - `matplotlib.axes.Axes.bar` # - `matplotlib.pyplot.subplots` +# +# .. tags:: +# +# styling: color +# plot-type: bar +# level: beginner From 176fcfc1f5a6805f7a32e687a9a2631e3c48760b Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 13 Jul 2024 15:21:19 -0400 Subject: [PATCH 2/8] Add example tags to the pie and polar examples --- galleries/examples/pie_and_polar_charts/bar_of_pie.py | 8 ++++++++ galleries/examples/pie_and_polar_charts/nested_pie.py | 6 ++++++ .../examples/pie_and_polar_charts/pie_and_donut_labels.py | 7 +++++++ galleries/examples/pie_and_polar_charts/pie_features.py | 5 +++++ galleries/examples/pie_and_polar_charts/polar_bar.py | 7 +++++++ galleries/examples/pie_and_polar_charts/polar_demo.py | 5 +++++ .../examples/pie_and_polar_charts/polar_error_caps.py | 7 +++++++ galleries/examples/pie_and_polar_charts/polar_legend.py | 6 ++++++ galleries/examples/pie_and_polar_charts/polar_scatter.py | 6 ++++++ 9 files changed, 57 insertions(+) diff --git a/galleries/examples/pie_and_polar_charts/bar_of_pie.py b/galleries/examples/pie_and_polar_charts/bar_of_pie.py index ef68b3d79971..6f18b964cef7 100644 --- a/galleries/examples/pie_and_polar_charts/bar_of_pie.py +++ b/galleries/examples/pie_and_polar_charts/bar_of_pie.py @@ -81,3 +81,11 @@ # - `matplotlib.axes.Axes.bar` / `matplotlib.pyplot.bar` # - `matplotlib.axes.Axes.pie` / `matplotlib.pyplot.pie` # - `matplotlib.patches.ConnectionPatch` +# +# .. tags:: +# +# component: subplot +# plot-type: pie +# plot-type: bar +# level: intermediate +# purpose: showcase diff --git a/galleries/examples/pie_and_polar_charts/nested_pie.py b/galleries/examples/pie_and_polar_charts/nested_pie.py index c83b4f6f84ee..8c84ca57e09f 100644 --- a/galleries/examples/pie_and_polar_charts/nested_pie.py +++ b/galleries/examples/pie_and_polar_charts/nested_pie.py @@ -90,3 +90,9 @@ # - `matplotlib.projections.polar` # - ``Axes.set`` (`matplotlib.artist.Artist.set`) # - `matplotlib.axes.Axes.set_axis_off` +# +# .. tag:: +# +# plot-type: pie +# level: beginner +# purpose: showcase 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 7f945d1056f4..13e3019bc7ba 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 @@ -132,3 +132,10 @@ def func(pct, allvals): # # - `matplotlib.axes.Axes.pie` / `matplotlib.pyplot.pie` # - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend` +# +# .. tags:: +# +# component: label +# component: annotation +# plot-type: pie +# level: beginner diff --git a/galleries/examples/pie_and_polar_charts/pie_features.py b/galleries/examples/pie_and_polar_charts/pie_features.py index 7794a3d22a7e..47781a31a373 100644 --- a/galleries/examples/pie_and_polar_charts/pie_features.py +++ b/galleries/examples/pie_and_polar_charts/pie_features.py @@ -130,3 +130,8 @@ # in this example: # # - `matplotlib.axes.Axes.pie` / `matplotlib.pyplot.pie` +# +# .. tags:: +# +# plot-type: pie +# level: beginner diff --git a/galleries/examples/pie_and_polar_charts/polar_bar.py b/galleries/examples/pie_and_polar_charts/polar_bar.py index 750032c8710d..ba0a3c25fd40 100644 --- a/galleries/examples/pie_and_polar_charts/polar_bar.py +++ b/galleries/examples/pie_and_polar_charts/polar_bar.py @@ -32,3 +32,10 @@ # # - `matplotlib.axes.Axes.bar` / `matplotlib.pyplot.bar` # - `matplotlib.projections.polar` +# +# .. tags:: +# +# plot-type: pie +# plot-type: bar +# level: beginner +# purpose: showcase diff --git a/galleries/examples/pie_and_polar_charts/polar_demo.py b/galleries/examples/pie_and_polar_charts/polar_demo.py index 75a7d61f6244..e4967079d19d 100644 --- a/galleries/examples/pie_and_polar_charts/polar_demo.py +++ b/galleries/examples/pie_and_polar_charts/polar_demo.py @@ -34,3 +34,8 @@ # - `matplotlib.projections.polar.PolarAxes.set_rticks` # - `matplotlib.projections.polar.PolarAxes.set_rmax` # - `matplotlib.projections.polar.PolarAxes.set_rlabel_position` +# +# .. tags:: +# +# plot-type: polar +# level: beginner diff --git a/galleries/examples/pie_and_polar_charts/polar_error_caps.py b/galleries/examples/pie_and_polar_charts/polar_error_caps.py index aa950e40613a..7f77a2c48834 100644 --- a/galleries/examples/pie_and_polar_charts/polar_error_caps.py +++ b/galleries/examples/pie_and_polar_charts/polar_error_caps.py @@ -51,3 +51,10 @@ # # - `matplotlib.axes.Axes.errorbar` / `matplotlib.pyplot.errorbar` # - `matplotlib.projections.polar` +# +# .. tags:: +# +# component: error +# plot-type: errorbar +# plot-type: polar +# level: beginner diff --git a/galleries/examples/pie_and_polar_charts/polar_legend.py b/galleries/examples/pie_and_polar_charts/polar_legend.py index 7972b0aaffd4..ab9b05aad075 100644 --- a/galleries/examples/pie_and_polar_charts/polar_legend.py +++ b/galleries/examples/pie_and_polar_charts/polar_legend.py @@ -38,3 +38,9 @@ # - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend` # - `matplotlib.projections.polar` # - `matplotlib.projections.polar.PolarAxes` +# +# .. tag:: +# +# component: legend +# plot-type: polar +# level: beginner diff --git a/galleries/examples/pie_and_polar_charts/polar_scatter.py b/galleries/examples/pie_and_polar_charts/polar_scatter.py index c36d74966805..af7dff04f195 100644 --- a/galleries/examples/pie_and_polar_charts/polar_scatter.py +++ b/galleries/examples/pie_and_polar_charts/polar_scatter.py @@ -67,3 +67,9 @@ # - `matplotlib.projections.polar.PolarAxes.set_theta_zero_location` # - `matplotlib.projections.polar.PolarAxes.set_thetamin` # - `matplotlib.projections.polar.PolarAxes.set_thetamax` +# +# .. tags:: +# +# plot-style: polar +# plot-style: scatter +# level: beginner From 30b777b995d2de70faaa3fcf6e43db024e61c99a Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 13 Jul 2024 18:09:31 -0400 Subject: [PATCH 3/8] Add tags to the subplots, axes, and figures examples --- .../subplots_axes_and_figures/align_labels_demo.py | 8 ++++++++ .../subplots_axes_and_figures/auto_subplots_adjust.py | 7 +++++++ .../subplots_axes_and_figures/axes_box_aspect.py | 6 ++++++ .../examples/subplots_axes_and_figures/axes_demo.py | 8 ++++++++ .../examples/subplots_axes_and_figures/axes_margins.py | 8 ++++++++ .../examples/subplots_axes_and_figures/axes_props.py | 7 +++++++ .../subplots_axes_and_figures/axes_zoom_effect.py | 7 +++++++ .../examples/subplots_axes_and_figures/axhspan_demo.py | 6 ++++++ .../subplots_axes_and_figures/axis_equal_demo.py | 8 ++++++++ .../subplots_axes_and_figures/axis_labels_demo.py | 7 +++++++ .../examples/subplots_axes_and_figures/broken_axis.py | 7 +++++++ .../subplots_axes_and_figures/custom_figure_class.py | 7 +++++++ .../subplots_axes_and_figures/demo_constrained_layout.py | 7 +++++++ .../subplots_axes_and_figures/demo_tight_layout.py | 7 +++++++ .../fahrenheit_celsius_scales.py | 7 +++++++ .../subplots_axes_and_figures/figure_size_units.py | 6 ++++++ .../examples/subplots_axes_and_figures/figure_title.py | 8 ++++++++ .../examples/subplots_axes_and_figures/ganged_plots.py | 7 +++++++ galleries/examples/subplots_axes_and_figures/geo_demo.py | 6 ++++++ .../subplots_axes_and_figures/gridspec_and_subplots.py | 6 ++++++ .../subplots_axes_and_figures/gridspec_multicolumn.py | 6 ++++++ .../subplots_axes_and_figures/gridspec_nested.py | 6 ++++++ .../examples/subplots_axes_and_figures/invert_axes.py | 7 +++++++ .../examples/subplots_axes_and_figures/secondary_axis.py | 6 ++++++ .../subplots_axes_and_figures/share_axis_lims_views.py | 7 +++++++ .../subplots_axes_and_figures/shared_axis_demo.py | 7 +++++++ .../examples/subplots_axes_and_figures/subfigures.py | 7 +++++++ galleries/examples/subplots_axes_and_figures/subplot.py | 7 +++++++ .../subplots_axes_and_figures/subplots_adjust.py | 7 +++++++ .../examples/subplots_axes_and_figures/subplots_demo.py | 9 +++++++++ .../examples/subplots_axes_and_figures/two_scales.py | 6 ++++++ .../subplots_axes_and_figures/zoom_inset_axes.py | 6 ++++++ 32 files changed, 221 insertions(+) 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 8e9a70d4ccd9..abb048ba395c 100644 --- a/galleries/examples/subplots_axes_and_figures/align_labels_demo.py +++ b/galleries/examples/subplots_axes_and_figures/align_labels_demo.py @@ -41,3 +41,11 @@ fig.align_titles() plt.show() + +# %% +# .. tags:: +# +# component: label +# component: title +# styling: position +# level: beginner 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 983a47e4e42c..ec865798d648 100644 --- a/galleries/examples/subplots_axes_and_figures/auto_subplots_adjust.py +++ b/galleries/examples/subplots_axes_and_figures/auto_subplots_adjust.py @@ -85,3 +85,10 @@ def on_draw(event): # - `matplotlib.figure.Figure.subplots_adjust` # - `matplotlib.gridspec.SubplotParams` # - `matplotlib.backend_bases.FigureCanvasBase.mpl_connect` +# +# .. tags:: +# +# component: subplot +# plot-type: line +# styling: position +# level: advanced 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 74b64f72c466..e17f21e7d41b 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py +++ b/galleries/examples/subplots_axes_and_figures/axes_box_aspect.py @@ -154,3 +154,9 @@ # in this example: # # - `matplotlib.axes.Axes.set_box_aspect` +# +# .. tags:: +# +# component: axes +# styling: size +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/axes_demo.py b/galleries/examples/subplots_axes_and_figures/axes_demo.py index f5620a9a980d..07f3ca2070c2 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axes_demo.py @@ -43,3 +43,11 @@ left_inset_ax.set(title='Impulse response', xlim=(0, .2), xticks=[], yticks=[]) plt.show() + +# %% +# .. tags:: +# +# component: axes +# plot-type: line +# plot-type: histogram +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/axes_margins.py b/galleries/examples/subplots_axes_and_figures/axes_margins.py index dd113c8c34e0..30298168c8e8 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_margins.py +++ b/galleries/examples/subplots_axes_and_figures/axes_margins.py @@ -86,3 +86,11 @@ def f(t): # - `matplotlib.axes.Axes.use_sticky_edges` # - `matplotlib.axes.Axes.pcolor` / `matplotlib.pyplot.pcolor` # - `matplotlib.patches.Polygon` +# +# .. tags:: +# +# component: axes +# plot-type: line +# plot-type: imshow +# plot-type: pcolor +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/axes_props.py b/galleries/examples/subplots_axes_and_figures/axes_props.py index 106c8e0db1ee..6bbcc88ad5b8 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_props.py +++ b/galleries/examples/subplots_axes_and_figures/axes_props.py @@ -19,3 +19,10 @@ ax.tick_params(labelcolor='r', labelsize='medium', width=3) plt.show() + +# %% +# .. tags:: +# +# component: ticks +# plot-type: line +# level: beginner 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 f139d0209427..c8d09de45888 100644 --- a/galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py +++ b/galleries/examples/subplots_axes_and_figures/axes_zoom_effect.py @@ -120,3 +120,10 @@ def zoom_effect02(ax1, ax2, **kwargs): zoom_effect02(axs["zoom2"], axs["main"]) plt.show() + +# %% +# .. tags:: +# +# component: subplot +# component: transform +# level: advanced diff --git a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py index 5544618016d6..971c6002ee71 100644 --- a/galleries/examples/subplots_axes_and_figures/axhspan_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axhspan_demo.py @@ -47,3 +47,9 @@ # .. seealso:: # # `~.Axes.axhline`, `~.Axes.axvline`, `~.Axes.axline` draw infinite lines. +# +# .. tags:: +# +# styling: shape +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/axis_equal_demo.py b/galleries/examples/subplots_axes_and_figures/axis_equal_demo.py index 6ac4d66da0e8..046af386ae59 100644 --- a/galleries/examples/subplots_axes_and_figures/axis_equal_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axis_equal_demo.py @@ -33,3 +33,11 @@ fig.tight_layout() plt.show() + +# %% +# .. tags:: +# +# component: axes +# styling: size +# plot-type: line +# level: beginner 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 ea99b78d8fb0..2d0bc427b1f9 100644 --- a/galleries/examples/subplots_axes_and_figures/axis_labels_demo.py +++ b/galleries/examples/subplots_axes_and_figures/axis_labels_demo.py @@ -18,3 +18,10 @@ cbar.set_label("ZLabel", loc='top') plt.show() + +# %% +# .. tags:: +# +# component: axis +# styling: position +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/broken_axis.py b/galleries/examples/subplots_axes_and_figures/broken_axis.py index 4d6ece305ed6..6305e613e327 100644 --- a/galleries/examples/subplots_axes_and_figures/broken_axis.py +++ b/galleries/examples/subplots_axes_and_figures/broken_axis.py @@ -52,3 +52,10 @@ plt.show() + +# %% +# .. tags:: +# +# component: axis +# plot-type: line +# level: intermediate diff --git a/galleries/examples/subplots_axes_and_figures/custom_figure_class.py b/galleries/examples/subplots_axes_and_figures/custom_figure_class.py index 96c7f1113787..328447062a5b 100644 --- a/galleries/examples/subplots_axes_and_figures/custom_figure_class.py +++ b/galleries/examples/subplots_axes_and_figures/custom_figure_class.py @@ -50,3 +50,10 @@ def __init__(self, *args, watermark=None, **kwargs): # - `matplotlib.pyplot.figure` # - `matplotlib.figure.Figure` # - `matplotlib.figure.Figure.text` +# +# .. tags:: +# +# component: figure +# plot-type: line +# level: intermediate +# purpose: showcase 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 67891cfed611..b3a59ce048c0 100644 --- a/galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py +++ b/galleries/examples/subplots_axes_and_figures/demo_constrained_layout.py @@ -69,3 +69,10 @@ def example_plot(ax): # # - `matplotlib.gridspec.GridSpec` # - `matplotlib.gridspec.GridSpecFromSubplotSpec` +# +# .. tags:: +# +# component: axes +# component: subplot +# styling: size +# level: beginner 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 a8d7524697ea..4ac0f1b99dfc 100644 --- a/galleries/examples/subplots_axes_and_figures/demo_tight_layout.py +++ b/galleries/examples/subplots_axes_and_figures/demo_tight_layout.py @@ -132,3 +132,10 @@ def example_plot(ax): # - `matplotlib.figure.Figure.add_gridspec` # - `matplotlib.figure.Figure.add_subplot` # - `matplotlib.pyplot.subplot2grid` +# +# .. tags:: +# +# component: axes +# component: subplot +# styling: size +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py b/galleries/examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py index 216641657b06..95b92482d5ac 100644 --- a/galleries/examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py +++ b/galleries/examples/subplots_axes_and_figures/fahrenheit_celsius_scales.py @@ -44,3 +44,10 @@ def convert_ax_c_to_celsius(ax_f): plt.show() make_plot() + +# %% +# .. tags:: +# +# component: axes +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/figure_size_units.py b/galleries/examples/subplots_axes_and_figures/figure_size_units.py index 0ce49c937d50..50292ef92b74 100644 --- a/galleries/examples/subplots_axes_and_figures/figure_size_units.py +++ b/galleries/examples/subplots_axes_and_figures/figure_size_units.py @@ -79,3 +79,9 @@ # - `matplotlib.pyplot.figure` # - `matplotlib.pyplot.subplots` # - `matplotlib.pyplot.subplot_mosaic` +# +# .. tags:: +# +# component: figure +# styling: size +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/figure_title.py b/galleries/examples/subplots_axes_and_figures/figure_title.py index 85e5044c4eba..1b0eb1a00b23 100644 --- a/galleries/examples/subplots_axes_and_figures/figure_title.py +++ b/galleries/examples/subplots_axes_and_figures/figure_title.py @@ -51,3 +51,11 @@ fig.supylabel('Stock price relative to max') plt.show() + +# %% +# .. tags:: +# +# component: figure +# component: title +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/ganged_plots.py b/galleries/examples/subplots_axes_and_figures/ganged_plots.py index d2f50fe2e986..3229d64a15b4 100644 --- a/galleries/examples/subplots_axes_and_figures/ganged_plots.py +++ b/galleries/examples/subplots_axes_and_figures/ganged_plots.py @@ -38,3 +38,10 @@ axs[2].set_ylim(-1, 1) plt.show() + +# %% +# .. tags:: +# +# component: subplot +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/geo_demo.py b/galleries/examples/subplots_axes_and_figures/geo_demo.py index f2f22751b215..02680c1fd692 100644 --- a/galleries/examples/subplots_axes_and_figures/geo_demo.py +++ b/galleries/examples/subplots_axes_and_figures/geo_demo.py @@ -40,3 +40,9 @@ plt.grid(True) plt.show() + +# %% +# .. tags:: +# +# plot-type: specialty +# domain: cartography 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 cfe5b123e897..9996bde9306a 100644 --- a/galleries/examples/subplots_axes_and_figures/gridspec_and_subplots.py +++ b/galleries/examples/subplots_axes_and_figures/gridspec_and_subplots.py @@ -28,3 +28,9 @@ fig.tight_layout() plt.show() + +# %% +# .. tags:: +# +# component: subplot +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py b/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py index a7fa34a10367..3762dec4fdb8 100644 --- a/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py +++ b/galleries/examples/subplots_axes_and_figures/gridspec_multicolumn.py @@ -32,3 +32,9 @@ def format_axes(fig): format_axes(fig) plt.show() + +# %% +# .. tags:: +# +# component: subplot +# level: intermediate diff --git a/galleries/examples/subplots_axes_and_figures/gridspec_nested.py b/galleries/examples/subplots_axes_and_figures/gridspec_nested.py index bfcb90cdfc4a..025bdb1185a7 100644 --- a/galleries/examples/subplots_axes_and_figures/gridspec_nested.py +++ b/galleries/examples/subplots_axes_and_figures/gridspec_nested.py @@ -44,3 +44,9 @@ def format_axes(fig): format_axes(fig) plt.show() + +# %% +# .. tags:: +# +# component: subplot +# level: intermediate diff --git a/galleries/examples/subplots_axes_and_figures/invert_axes.py b/galleries/examples/subplots_axes_and_figures/invert_axes.py index 31f4d75680ce..40a4ca2479b7 100644 --- a/galleries/examples/subplots_axes_and_figures/invert_axes.py +++ b/galleries/examples/subplots_axes_and_figures/invert_axes.py @@ -33,3 +33,10 @@ ax2.grid(True) plt.show() + +# %% +# .. tags:: +# +# component: axis +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/secondary_axis.py b/galleries/examples/subplots_axes_and_figures/secondary_axis.py index ab42d3a6c182..d6dfd33f62c1 100644 --- a/galleries/examples/subplots_axes_and_figures/secondary_axis.py +++ b/galleries/examples/subplots_axes_and_figures/secondary_axis.py @@ -211,3 +211,9 @@ def anomaly_to_celsius(x): # # - `matplotlib.axes.Axes.secondary_xaxis` # - `matplotlib.axes.Axes.secondary_yaxis` +# +# .. tags:: +# +# component: axis +# plot-type: line +# level: beginner 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 f8073b2c3c31..e0aa04d13def 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 @@ -23,3 +23,10 @@ ax2.plot(t, np.sin(4*np.pi*t)) plt.show() + +# %% +# .. tags:: +# +# component: axis +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/shared_axis_demo.py b/galleries/examples/subplots_axes_and_figures/shared_axis_demo.py index 6b3b3839a437..a5c000a24a96 100644 --- a/galleries/examples/subplots_axes_and_figures/shared_axis_demo.py +++ b/galleries/examples/subplots_axes_and_figures/shared_axis_demo.py @@ -55,3 +55,10 @@ plt.plot(t, s3) plt.xlim(0.01, 5.0) plt.show() + +# %% +# .. tags:: +# +# component: axis +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/subfigures.py b/galleries/examples/subplots_axes_and_figures/subfigures.py index 6272de975c4d..5060946b59b2 100644 --- a/galleries/examples/subplots_axes_and_figures/subfigures.py +++ b/galleries/examples/subplots_axes_and_figures/subfigures.py @@ -146,3 +146,10 @@ def example_plot(ax, fontsize=12, hide_labels=False): axsRight = subfigs[1].subplots(2, 2) plt.show() + +# %% +# .. tags:: +# +# component: figure +# plot-type: pcolormesh +# level: intermediate diff --git a/galleries/examples/subplots_axes_and_figures/subplot.py b/galleries/examples/subplots_axes_and_figures/subplot.py index 4b78e7a5a840..e23b86fa3e9c 100644 --- a/galleries/examples/subplots_axes_and_figures/subplot.py +++ b/galleries/examples/subplots_axes_and_figures/subplot.py @@ -49,3 +49,10 @@ plt.ylabel('Undamped') plt.show() + +# %% +# .. tags:: +# +# component: subplot +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/subplots_adjust.py b/galleries/examples/subplots_axes_and_figures/subplots_adjust.py index d4393be51fb4..8e3b876adfeb 100644 --- a/galleries/examples/subplots_axes_and_figures/subplots_adjust.py +++ b/galleries/examples/subplots_axes_and_figures/subplots_adjust.py @@ -29,3 +29,10 @@ plt.colorbar(cax=cax) plt.show() + +# %% +# .. tags:: +# +# component: subplot +# plot-type: imshow +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/subplots_demo.py b/galleries/examples/subplots_axes_and_figures/subplots_demo.py index afc71c795365..acd031b8201d 100644 --- a/galleries/examples/subplots_axes_and_figures/subplots_demo.py +++ b/galleries/examples/subplots_axes_and_figures/subplots_demo.py @@ -209,3 +209,12 @@ ax2.plot(x, y ** 2) plt.show() + +# %% +# .. tags:: +# +# component: subplot +# plot-type: line +# plot-type: polar +# level: beginner +# purpose: showcase diff --git a/galleries/examples/subplots_axes_and_figures/two_scales.py b/galleries/examples/subplots_axes_and_figures/two_scales.py index 249a65fd64fe..a33b80045cb0 100644 --- a/galleries/examples/subplots_axes_and_figures/two_scales.py +++ b/galleries/examples/subplots_axes_and_figures/two_scales.py @@ -49,3 +49,9 @@ # - `matplotlib.axes.Axes.twinx` / `matplotlib.pyplot.twinx` # - `matplotlib.axes.Axes.twiny` / `matplotlib.pyplot.twiny` # - `matplotlib.axes.Axes.tick_params` / `matplotlib.pyplot.tick_params` +# +# .. tags:: +# +# component: Axes +# plot-type: line +# level: beginner diff --git a/galleries/examples/subplots_axes_and_figures/zoom_inset_axes.py b/galleries/examples/subplots_axes_and_figures/zoom_inset_axes.py index 4cbd9875e4bc..4453b3ec39f1 100644 --- a/galleries/examples/subplots_axes_and_figures/zoom_inset_axes.py +++ b/galleries/examples/subplots_axes_and_figures/zoom_inset_axes.py @@ -43,3 +43,9 @@ # - `matplotlib.axes.Axes.inset_axes` # - `matplotlib.axes.Axes.indicate_inset_zoom` # - `matplotlib.axes.Axes.imshow` +# +# .. tags:: +# +# component: axes +# plot-type: imshow +# level: intermediate From a8cf72a26043d29d2f6233c022338f76faf3f16e Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 13 Jul 2024 19:18:58 -0400 Subject: [PATCH 4/8] Add tags to the lines, bars, and markers examples --- galleries/examples/lines_bars_and_markers/bar_colors.py | 7 +++++++ .../examples/lines_bars_and_markers/bar_label_demo.py | 6 ++++++ galleries/examples/lines_bars_and_markers/bar_stacked.py | 6 ++++++ galleries/examples/lines_bars_and_markers/barchart.py | 6 ++++++ galleries/examples/lines_bars_and_markers/barh.py | 6 ++++++ galleries/examples/lines_bars_and_markers/broken_barh.py | 7 +++++++ galleries/examples/lines_bars_and_markers/capstyle.py | 5 +++++ .../lines_bars_and_markers/categorical_variables.py | 6 ++++++ galleries/examples/lines_bars_and_markers/cohere.py | 7 +++++++ galleries/examples/lines_bars_and_markers/csd_demo.py | 7 +++++++ .../examples/lines_bars_and_markers/curve_error_band.py | 6 ++++++ .../lines_bars_and_markers/errorbar_limits_simple.py | 6 ++++++ .../examples/lines_bars_and_markers/errorbar_subsample.py | 7 +++++++ .../lines_bars_and_markers/eventcollection_demo.py | 6 ++++++ .../examples/lines_bars_and_markers/eventplot_demo.py | 7 +++++++ galleries/examples/lines_bars_and_markers/fill.py | 6 ++++++ .../examples/lines_bars_and_markers/fill_between_alpha.py | 8 ++++++++ .../examples/lines_bars_and_markers/fill_between_demo.py | 7 +++++++ .../examples/lines_bars_and_markers/fill_betweenx_demo.py | 6 ++++++ galleries/examples/lines_bars_and_markers/gradient_bar.py | 8 ++++++++ galleries/examples/lines_bars_and_markers/hat_graph.py | 6 ++++++ .../horizontal_barchart_distribution.py | 7 +++++++ galleries/examples/lines_bars_and_markers/joinstyle.py | 3 +++ .../lines_bars_and_markers/line_demo_dash_control.py | 7 +++++++ .../lines_bars_and_markers/lines_with_ticks_demo.py | 7 +++++++ galleries/examples/lines_bars_and_markers/linestyles.py | 6 ++++++ .../examples/lines_bars_and_markers/marker_reference.py | 6 ++++++ .../examples/lines_bars_and_markers/markevery_demo.py | 7 +++++++ galleries/examples/lines_bars_and_markers/masked_demo.py | 6 ++++++ .../examples/lines_bars_and_markers/multicolored_line.py | 8 ++++++++ .../lines_bars_and_markers/multivariate_marker_plot.py | 8 ++++++++ galleries/examples/lines_bars_and_markers/psd_demo.py | 7 +++++++ .../examples/lines_bars_and_markers/scatter_demo2.py | 8 ++++++++ galleries/examples/lines_bars_and_markers/scatter_hist.py | 7 +++++++ .../examples/lines_bars_and_markers/scatter_masked.py | 7 +++++++ .../examples/lines_bars_and_markers/scatter_star_poly.py | 6 ++++++ .../lines_bars_and_markers/scatter_with_legend.py | 6 ++++++ galleries/examples/lines_bars_and_markers/simple_plot.py | 5 +++++ galleries/examples/lines_bars_and_markers/span_regions.py | 6 ++++++ .../examples/lines_bars_and_markers/spectrum_demo.py | 7 +++++++ .../examples/lines_bars_and_markers/stackplot_demo.py | 6 ++++++ galleries/examples/lines_bars_and_markers/stairs_demo.py | 5 +++++ galleries/examples/lines_bars_and_markers/stem_plot.py | 5 +++++ galleries/examples/lines_bars_and_markers/step_demo.py | 6 ++++++ galleries/examples/lines_bars_and_markers/timeline.py | 6 ++++++ .../examples/lines_bars_and_markers/vline_hline_demo.py | 6 ++++++ .../examples/lines_bars_and_markers/xcorr_acorr_demo.py | 5 +++++ 47 files changed, 299 insertions(+) diff --git a/galleries/examples/lines_bars_and_markers/bar_colors.py b/galleries/examples/lines_bars_and_markers/bar_colors.py index f173b50c0672..1692c222957d 100644 --- a/galleries/examples/lines_bars_and_markers/bar_colors.py +++ b/galleries/examples/lines_bars_and_markers/bar_colors.py @@ -24,3 +24,10 @@ ax.legend(title='Fruit color') plt.show() + +# %% +# .. tags:: +# +# styling: color +# plot-style: bar +# level: beginner 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 8393407d1c57..2e43dbb18013 100644 --- a/galleries/examples/lines_bars_and_markers/bar_label_demo.py +++ b/galleries/examples/lines_bars_and_markers/bar_label_demo.py @@ -118,3 +118,9 @@ # - `matplotlib.axes.Axes.bar` / `matplotlib.pyplot.bar` # - `matplotlib.axes.Axes.barh` / `matplotlib.pyplot.barh` # - `matplotlib.axes.Axes.bar_label` / `matplotlib.pyplot.bar_label` +# +# .. tags:: +# +# component: label +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/bar_stacked.py b/galleries/examples/lines_bars_and_markers/bar_stacked.py index 81ee305e7072..f1f97e89da13 100644 --- a/galleries/examples/lines_bars_and_markers/bar_stacked.py +++ b/galleries/examples/lines_bars_and_markers/bar_stacked.py @@ -34,3 +34,9 @@ ax.legend(loc="upper right") plt.show() + +# %% +# .. tags:: +# +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/barchart.py b/galleries/examples/lines_bars_and_markers/barchart.py index c533ca2eda37..f2157a89c0cd 100644 --- a/galleries/examples/lines_bars_and_markers/barchart.py +++ b/galleries/examples/lines_bars_and_markers/barchart.py @@ -49,3 +49,9 @@ # # - `matplotlib.axes.Axes.bar` / `matplotlib.pyplot.bar` # - `matplotlib.axes.Axes.bar_label` / `matplotlib.pyplot.bar_label` +# +# .. tags:: +# +# component: label +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/barh.py b/galleries/examples/lines_bars_and_markers/barh.py index 4de8bc85d3d5..5493c7456c75 100644 --- a/galleries/examples/lines_bars_and_markers/barh.py +++ b/galleries/examples/lines_bars_and_markers/barh.py @@ -26,3 +26,9 @@ ax.set_title('How fast do you want to go today?') plt.show() + +# %% +# .. tags:: +# +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/broken_barh.py b/galleries/examples/lines_bars_and_markers/broken_barh.py index 6da38f1e465f..e1550385155a 100644 --- a/galleries/examples/lines_bars_and_markers/broken_barh.py +++ b/galleries/examples/lines_bars_and_markers/broken_barh.py @@ -24,3 +24,10 @@ horizontalalignment='right', verticalalignment='top') plt.show() + +# %% +# .. tags:: +# +# component: annotation +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/capstyle.py b/galleries/examples/lines_bars_and_markers/capstyle.py index d17f86c6be58..4927c904caa7 100644 --- a/galleries/examples/lines_bars_and_markers/capstyle.py +++ b/galleries/examples/lines_bars_and_markers/capstyle.py @@ -14,3 +14,8 @@ CapStyle.demo() plt.show() + +# %% +# .. tags:: +# +# purpose: reference diff --git a/galleries/examples/lines_bars_and_markers/categorical_variables.py b/galleries/examples/lines_bars_and_markers/categorical_variables.py index e28dda0dda47..4cceb38fbd4d 100644 --- a/galleries/examples/lines_bars_and_markers/categorical_variables.py +++ b/galleries/examples/lines_bars_and_markers/categorical_variables.py @@ -32,3 +32,9 @@ ax.legend() plt.show() + +# %% +# .. tags:: +# +# plot-type: specialty +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/cohere.py b/galleries/examples/lines_bars_and_markers/cohere.py index 917188292311..f02788ea1d69 100644 --- a/galleries/examples/lines_bars_and_markers/cohere.py +++ b/galleries/examples/lines_bars_and_markers/cohere.py @@ -31,3 +31,10 @@ axs[1].set_ylabel('Coherence') plt.show() + +# %% +# .. tags:: +# +# domain: signal-processing +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/csd_demo.py b/galleries/examples/lines_bars_and_markers/csd_demo.py index 6d7a9746e88e..76d9f0825223 100644 --- a/galleries/examples/lines_bars_and_markers/csd_demo.py +++ b/galleries/examples/lines_bars_and_markers/csd_demo.py @@ -38,3 +38,10 @@ ax2.set_ylabel('CSD (dB)') plt.show() + +# %% +# .. tags:: +# +# domain: signal-processing +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/curve_error_band.py b/galleries/examples/lines_bars_and_markers/curve_error_band.py index 61c73e415163..320d2e710be6 100644 --- a/galleries/examples/lines_bars_and_markers/curve_error_band.py +++ b/galleries/examples/lines_bars_and_markers/curve_error_band.py @@ -85,3 +85,9 @@ def draw_error_band(ax, x, y, err, **kwargs): # # - `matplotlib.patches.PathPatch` # - `matplotlib.path.Path` +# +# .. tags:: +# +# component: error +# plot-type: line +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/errorbar_limits_simple.py b/galleries/examples/lines_bars_and_markers/errorbar_limits_simple.py index aff01eece49a..d9c8375c61fb 100644 --- a/galleries/examples/lines_bars_and_markers/errorbar_limits_simple.py +++ b/galleries/examples/lines_bars_and_markers/errorbar_limits_simple.py @@ -60,3 +60,9 @@ # in this example: # # - `matplotlib.axes.Axes.errorbar` / `matplotlib.pyplot.errorbar` +# +# .. tags:: +# +# component: error +# plot-type: errorbar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/errorbar_subsample.py b/galleries/examples/lines_bars_and_markers/errorbar_subsample.py index e5aa84577231..009286e28ea9 100644 --- a/galleries/examples/lines_bars_and_markers/errorbar_subsample.py +++ b/galleries/examples/lines_bars_and_markers/errorbar_subsample.py @@ -38,3 +38,10 @@ fig.suptitle('Errorbar subsampling') plt.show() + +# %% +# .. tags:: +# +# component: error +# plot-type: errorbar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/eventcollection_demo.py b/galleries/examples/lines_bars_and_markers/eventcollection_demo.py index 18783e1649bc..1aa2fa622812 100644 --- a/galleries/examples/lines_bars_and_markers/eventcollection_demo.py +++ b/galleries/examples/lines_bars_and_markers/eventcollection_demo.py @@ -60,3 +60,9 @@ # display the plot plt.show() + +# %% +# .. tags:: +# +# plot-type: eventplot +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/eventplot_demo.py b/galleries/examples/lines_bars_and_markers/eventplot_demo.py index b76999ef05d5..17797c2f697a 100644 --- a/galleries/examples/lines_bars_and_markers/eventplot_demo.py +++ b/galleries/examples/lines_bars_and_markers/eventplot_demo.py @@ -60,3 +60,10 @@ linelengths=linelengths2, orientation='vertical') plt.show() + +# %% +# .. tags:: +# +# plot-type: eventplot +# level: beginner +# purpose: showcase diff --git a/galleries/examples/lines_bars_and_markers/fill.py b/galleries/examples/lines_bars_and_markers/fill.py index a9cba03c273c..4eba083fa825 100644 --- a/galleries/examples/lines_bars_and_markers/fill.py +++ b/galleries/examples/lines_bars_and_markers/fill.py @@ -85,3 +85,9 @@ def _koch_snowflake_complex(order): # # - `matplotlib.axes.Axes.fill` / `matplotlib.pyplot.fill` # - `matplotlib.axes.Axes.axis` / `matplotlib.pyplot.axis` +# +# .. tags:: +# +# styling: shape +# level: beginner +# purpose: showcase 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 1dadc4309e2e..f462f6bf2428 100644 --- a/galleries/examples/lines_bars_and_markers/fill_between_alpha.py +++ b/galleries/examples/lines_bars_and_markers/fill_between_alpha.py @@ -137,3 +137,11 @@ # :doc:`/gallery/subplots_axes_and_figures/axhspan_demo`. plt.show() + +# %% +# .. tags:: +# +# styling: alpha +# plot-type: fill_between +# level: intermediate +# purpose: showcase 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 5afdd722360f..62441e5df160 100644 --- a/galleries/examples/lines_bars_and_markers/fill_between_demo.py +++ b/galleries/examples/lines_bars_and_markers/fill_between_demo.py @@ -139,3 +139,10 @@ # # - `matplotlib.axes.Axes.fill_between` / `matplotlib.pyplot.fill_between` # - `matplotlib.axes.Axes.get_xaxis_transform` +# +# .. tags:: +# +# styling: conditional +# plot-type: fill_between +# level: beginner +# prupose: showcase 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 472f42fdbfc4..ebd8d2a24a7b 100644 --- a/galleries/examples/lines_bars_and_markers/fill_betweenx_demo.py +++ b/galleries/examples/lines_bars_and_markers/fill_betweenx_demo.py @@ -52,3 +52,9 @@ # would be to interpolate all arrays to a very fine grid before plotting. plt.show() + +# %% +# .. tags:: +# +# plot-type: fill_between +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/gradient_bar.py b/galleries/examples/lines_bars_and_markers/gradient_bar.py index 4cd86f26590f..2e9e2c8aa4aa 100644 --- a/galleries/examples/lines_bars_and_markers/gradient_bar.py +++ b/galleries/examples/lines_bars_and_markers/gradient_bar.py @@ -71,3 +71,11 @@ def gradient_bar(ax, x, y, width=0.5, bottom=0): y = np.random.rand(N) gradient_bar(ax, x, y, width=0.7) plt.show() + +# %% +# .. tags:: +# +# styling: color +# plot-type: imshow +# level: intermediate +# purpose: showcase diff --git a/galleries/examples/lines_bars_and_markers/hat_graph.py b/galleries/examples/lines_bars_and_markers/hat_graph.py index 0091c3c95d51..0f6d934f1cb1 100644 --- a/galleries/examples/lines_bars_and_markers/hat_graph.py +++ b/galleries/examples/lines_bars_and_markers/hat_graph.py @@ -78,3 +78,9 @@ def label_bars(heights, rects): # # - `matplotlib.axes.Axes.bar` / `matplotlib.pyplot.bar` # - `matplotlib.axes.Axes.annotate` / `matplotlib.pyplot.annotate` +# +# .. tags:: +# +# component: annotate +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/horizontal_barchart_distribution.py b/galleries/examples/lines_bars_and_markers/horizontal_barchart_distribution.py index ae638a90c3fd..3f7e499f38e7 100644 --- a/galleries/examples/lines_bars_and_markers/horizontal_barchart_distribution.py +++ b/galleries/examples/lines_bars_and_markers/horizontal_barchart_distribution.py @@ -78,3 +78,10 @@ def survey(results, category_names): # - `matplotlib.axes.Axes.barh` / `matplotlib.pyplot.barh` # - `matplotlib.axes.Axes.bar_label` / `matplotlib.pyplot.bar_label` # - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend` +# +# .. tags:: +# +# domain: statistics +# component: label +# plot-type: bar +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/joinstyle.py b/galleries/examples/lines_bars_and_markers/joinstyle.py index 27ad9ede96b1..304ffa614a61 100644 --- a/galleries/examples/lines_bars_and_markers/joinstyle.py +++ b/galleries/examples/lines_bars_and_markers/joinstyle.py @@ -14,3 +14,6 @@ JoinStyle.demo() plt.show() + +# %% +# .. tags:: purpose: reference, styling: linestyle \ No newline at end of file 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 5952809125de..3b3880794d3d 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 @@ -47,3 +47,10 @@ ax.legend(handlelength=4) plt.show() + +# %% +# .. tags:: +# +# styling: linestyle +# plot-style: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/lines_with_ticks_demo.py b/galleries/examples/lines_bars_and_markers/lines_with_ticks_demo.py index 00776d89caff..fba7eb9f045e 100644 --- a/galleries/examples/lines_bars_and_markers/lines_with_ticks_demo.py +++ b/galleries/examples/lines_bars_and_markers/lines_with_ticks_demo.py @@ -30,3 +30,10 @@ ax.legend() plt.show() + +# %% +# .. tags:: +# +# styling: linestyle +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/linestyles.py b/galleries/examples/lines_bars_and_markers/linestyles.py index f3ce3aa6e7ec..9f1829670c65 100644 --- a/galleries/examples/lines_bars_and_markers/linestyles.py +++ b/galleries/examples/lines_bars_and_markers/linestyles.py @@ -73,3 +73,9 @@ def plot_linestyles(ax, linestyles, title): plt.tight_layout() plt.show() + +# %% +# .. tags:: +# +# styling: linestyle +# purpose: reference diff --git a/galleries/examples/lines_bars_and_markers/marker_reference.py b/galleries/examples/lines_bars_and_markers/marker_reference.py index f99afb08e143..32b6291cbc76 100644 --- a/galleries/examples/lines_bars_and_markers/marker_reference.py +++ b/galleries/examples/lines_bars_and_markers/marker_reference.py @@ -240,3 +240,9 @@ def split_list(a_list): format_axes(ax) plt.show() + +# %% +# .. tags:: +# +# component: marker +# purpose: reference diff --git a/galleries/examples/lines_bars_and_markers/markevery_demo.py b/galleries/examples/lines_bars_and_markers/markevery_demo.py index cc02fb5ee576..919e12cde952 100644 --- a/galleries/examples/lines_bars_and_markers/markevery_demo.py +++ b/galleries/examples/lines_bars_and_markers/markevery_demo.py @@ -96,3 +96,10 @@ ax.plot(theta, r, 'o', ls='-', ms=4, markevery=markevery) plt.show() + +# %% +# .. tags:: +# +# component: marker +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/masked_demo.py b/galleries/examples/lines_bars_and_markers/masked_demo.py index a0b63ae30fe4..842c5c022f0b 100644 --- a/galleries/examples/lines_bars_and_markers/masked_demo.py +++ b/galleries/examples/lines_bars_and_markers/masked_demo.py @@ -48,3 +48,9 @@ plt.legend() plt.title('Masked and NaN data') plt.show() + +# %% +# .. tags:: +# +# plot-type: line +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/multicolored_line.py b/galleries/examples/lines_bars_and_markers/multicolored_line.py index 3d14ecaf8567..8c72d28e9e67 100644 --- a/galleries/examples/lines_bars_and_markers/multicolored_line.py +++ b/galleries/examples/lines_bars_and_markers/multicolored_line.py @@ -188,3 +188,11 @@ def colored_line_between_pts(x, y, c, ax, **lc_kwargs): ax2.set_title("Color between points") plt.show() + +# %% +# .. tags:: +# +# styling: color +# styling: linestyle +# plot-type: line +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/multivariate_marker_plot.py b/galleries/examples/lines_bars_and_markers/multivariate_marker_plot.py index 13609422e690..1f149c030abe 100644 --- a/galleries/examples/lines_bars_and_markers/multivariate_marker_plot.py +++ b/galleries/examples/lines_bars_and_markers/multivariate_marker_plot.py @@ -45,3 +45,11 @@ ax.set_ylabel("Y position [m]") plt.show() + +# %% +# .. tags:: +# +# component: marker +# styling: color +# level: beginner +# purpose: fun diff --git a/galleries/examples/lines_bars_and_markers/psd_demo.py b/galleries/examples/lines_bars_and_markers/psd_demo.py index fa0a8565b6ff..edbfc79289af 100644 --- a/galleries/examples/lines_bars_and_markers/psd_demo.py +++ b/galleries/examples/lines_bars_and_markers/psd_demo.py @@ -178,3 +178,10 @@ ax1.set_ylim(yrange) plt.show() + +# %% +# .. tags:: +# +# domain: signal-processing +# plot-type: line +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/scatter_demo2.py b/galleries/examples/lines_bars_and_markers/scatter_demo2.py index c3d57c423d69..33e532bb9af9 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_demo2.py +++ b/galleries/examples/lines_bars_and_markers/scatter_demo2.py @@ -34,3 +34,11 @@ fig.tight_layout() plt.show() + +# %% +# .. tags:: +# +# component: marker +# component: color +# plot-style: scatter +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/scatter_hist.py b/galleries/examples/lines_bars_and_markers/scatter_hist.py index 95a373961aa1..505edf6d627f 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_hist.py +++ b/galleries/examples/lines_bars_and_markers/scatter_hist.py @@ -120,3 +120,10 @@ def scatter_hist(x, y, ax, ax_histx, ax_histy): # - `matplotlib.axes.Axes.inset_axes` # - `matplotlib.axes.Axes.scatter` # - `matplotlib.axes.Axes.hist` +# +# .. tags:: +# +# component: axes +# plot-type: scatter +# plot-type: histogram +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/scatter_masked.py b/galleries/examples/lines_bars_and_markers/scatter_masked.py index 2bf6e03a46d0..97132e85192e 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_masked.py +++ b/galleries/examples/lines_bars_and_markers/scatter_masked.py @@ -30,3 +30,10 @@ plt.plot(r0 * np.cos(theta), r0 * np.sin(theta)) plt.show() + +# %% +# .. tags:: +# +# component: marker +# plot-type: scatter +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/scatter_star_poly.py b/galleries/examples/lines_bars_and_markers/scatter_star_poly.py index d97408333455..c2fee968ad7b 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_star_poly.py +++ b/galleries/examples/lines_bars_and_markers/scatter_star_poly.py @@ -51,3 +51,9 @@ axs[1, 2].set_title("marker=(5, 2)") plt.show() + +# %% +# .. tags:: +# +# component: marker +# level: beginner 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 5241e3ef1508..e9f19981fe4a 100644 --- a/galleries/examples/lines_bars_and_markers/scatter_with_legend.py +++ b/galleries/examples/lines_bars_and_markers/scatter_with_legend.py @@ -109,3 +109,9 @@ # - `matplotlib.axes.Axes.scatter` / `matplotlib.pyplot.scatter` # - `matplotlib.axes.Axes.legend` / `matplotlib.pyplot.legend` # - `matplotlib.collections.PathCollection.legend_elements` +# +# .. tags:: +# +# component: legend +# plot-type: scatter +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/simple_plot.py b/galleries/examples/lines_bars_and_markers/simple_plot.py index c8182035fc41..bcac888b8c4a 100644 --- a/galleries/examples/lines_bars_and_markers/simple_plot.py +++ b/galleries/examples/lines_bars_and_markers/simple_plot.py @@ -33,3 +33,8 @@ # - `matplotlib.axes.Axes.plot` / `matplotlib.pyplot.plot` # - `matplotlib.pyplot.subplots` # - `matplotlib.figure.Figure.savefig` +# +# .. tags:: +# +# plot-style: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/span_regions.py b/galleries/examples/lines_bars_and_markers/span_regions.py index e73b1af47baa..8128bd3b865b 100644 --- a/galleries/examples/lines_bars_and_markers/span_regions.py +++ b/galleries/examples/lines_bars_and_markers/span_regions.py @@ -29,3 +29,9 @@ # in this example: # # - `matplotlib.axes.Axes.fill_between` +# +# .. tags:: +# +# styling: conditional +# plot-style: fill_between +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/spectrum_demo.py b/galleries/examples/lines_bars_and_markers/spectrum_demo.py index 147d802b6eff..57706e22be9d 100644 --- a/galleries/examples/lines_bars_and_markers/spectrum_demo.py +++ b/galleries/examples/lines_bars_and_markers/spectrum_demo.py @@ -49,3 +49,10 @@ axs["angle"].angle_spectrum(s, Fs=Fs, color='C2') plt.show() + +# %% +# .. tags:: +# +# domain: signal-processing +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/stackplot_demo.py b/galleries/examples/lines_bars_and_markers/stackplot_demo.py index d02a9af73da3..2ed52ed9a2ce 100644 --- a/galleries/examples/lines_bars_and_markers/stackplot_demo.py +++ b/galleries/examples/lines_bars_and_markers/stackplot_demo.py @@ -73,3 +73,9 @@ def add_random_gaussian(a): fig, ax = plt.subplots() ax.stackplot(x, ys, baseline='wiggle') plt.show() + +# %% +# .. tags:: +# +# plot-type: stackplot +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/stairs_demo.py b/galleries/examples/lines_bars_and_markers/stairs_demo.py index 223e8c2aa1e5..9c7506e52b27 100644 --- a/galleries/examples/lines_bars_and_markers/stairs_demo.py +++ b/galleries/examples/lines_bars_and_markers/stairs_demo.py @@ -90,3 +90,8 @@ # # - `matplotlib.axes.Axes.stairs` / `matplotlib.pyplot.stairs` # - `matplotlib.patches.StepPatch` +# +# .. tags:: +# +# plot-type: stairs +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/stem_plot.py b/galleries/examples/lines_bars_and_markers/stem_plot.py index d779197e50cc..cde8fd8e8017 100644 --- a/galleries/examples/lines_bars_and_markers/stem_plot.py +++ b/galleries/examples/lines_bars_and_markers/stem_plot.py @@ -36,3 +36,8 @@ # in this example: # # - `matplotlib.axes.Axes.stem` / `matplotlib.pyplot.stem` +# +# .. tags:: +# +# plot-type: stem +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/step_demo.py b/galleries/examples/lines_bars_and_markers/step_demo.py index 97d2a37eb4c6..f74a069e52f3 100644 --- a/galleries/examples/lines_bars_and_markers/step_demo.py +++ b/galleries/examples/lines_bars_and_markers/step_demo.py @@ -63,3 +63,9 @@ # # - `matplotlib.axes.Axes.step` / `matplotlib.pyplot.step` # - `matplotlib.axes.Axes.plot` / `matplotlib.pyplot.plot` +# +# .. tags:: +# +# plot-type: step +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/timeline.py b/galleries/examples/lines_bars_and_markers/timeline.py index b7f8ec57b1cc..55f90d5103d2 100644 --- a/galleries/examples/lines_bars_and_markers/timeline.py +++ b/galleries/examples/lines_bars_and_markers/timeline.py @@ -128,3 +128,9 @@ def is_feature(release): # - `matplotlib.axis.Axis.set_major_formatter` # - `matplotlib.dates.MonthLocator` # - `matplotlib.dates.DateFormatter` +# +# .. tags:: +# +# component: annotate +# plot-type: line +# level: intermediate diff --git a/galleries/examples/lines_bars_and_markers/vline_hline_demo.py b/galleries/examples/lines_bars_and_markers/vline_hline_demo.py index c2f5d025b15c..4bec4be760ee 100644 --- a/galleries/examples/lines_bars_and_markers/vline_hline_demo.py +++ b/galleries/examples/lines_bars_and_markers/vline_hline_demo.py @@ -32,3 +32,9 @@ hax.set_title('Horizontal lines demo') plt.show() + +# %% +# .. tags:: +# +# plot-type: line +# level: beginner diff --git a/galleries/examples/lines_bars_and_markers/xcorr_acorr_demo.py b/galleries/examples/lines_bars_and_markers/xcorr_acorr_demo.py index eff0d7269a49..7878ef8d7468 100644 --- a/galleries/examples/lines_bars_and_markers/xcorr_acorr_demo.py +++ b/galleries/examples/lines_bars_and_markers/xcorr_acorr_demo.py @@ -34,3 +34,8 @@ # # - `matplotlib.axes.Axes.acorr` / `matplotlib.pyplot.acorr` # - `matplotlib.axes.Axes.xcorr` / `matplotlib.pyplot.xcorr` +# +# .. tags:: +# +# domain: statistics +# level: beginner From 04386e58ae75f23b2078669637b9db40ffd8cee4 Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 13 Jul 2024 19:26:25 -0400 Subject: [PATCH 5/8] Add missing newline at end of joinstyle.py example --- galleries/examples/lines_bars_and_markers/joinstyle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/examples/lines_bars_and_markers/joinstyle.py b/galleries/examples/lines_bars_and_markers/joinstyle.py index 304ffa614a61..09ae03e07692 100644 --- a/galleries/examples/lines_bars_and_markers/joinstyle.py +++ b/galleries/examples/lines_bars_and_markers/joinstyle.py @@ -16,4 +16,4 @@ plt.show() # %% -# .. tags:: purpose: reference, styling: linestyle \ No newline at end of file +# .. tags:: purpose: reference, styling: linestyle From c120320bd3850de8866a4b61ff8b686caea9dccf Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sat, 13 Jul 2024 21:36:14 -0400 Subject: [PATCH 6/8] Fix typos in tag directives. --- galleries/examples/pie_and_polar_charts/nested_pie.py | 2 +- galleries/examples/pie_and_polar_charts/polar_legend.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/examples/pie_and_polar_charts/nested_pie.py b/galleries/examples/pie_and_polar_charts/nested_pie.py index 8c84ca57e09f..412299bb4446 100644 --- a/galleries/examples/pie_and_polar_charts/nested_pie.py +++ b/galleries/examples/pie_and_polar_charts/nested_pie.py @@ -91,7 +91,7 @@ # - ``Axes.set`` (`matplotlib.artist.Artist.set`) # - `matplotlib.axes.Axes.set_axis_off` # -# .. tag:: +# .. tags:: # # plot-type: pie # level: beginner diff --git a/galleries/examples/pie_and_polar_charts/polar_legend.py b/galleries/examples/pie_and_polar_charts/polar_legend.py index ab9b05aad075..cef4bc8ccef6 100644 --- a/galleries/examples/pie_and_polar_charts/polar_legend.py +++ b/galleries/examples/pie_and_polar_charts/polar_legend.py @@ -39,7 +39,7 @@ # - `matplotlib.projections.polar` # - `matplotlib.projections.polar.PolarAxes` # -# .. tag:: +# .. tags:: # # component: legend # plot-type: polar From e88c235c44d4fae524d7f6b731c0082e2888ab25 Mon Sep 17 00:00:00 2001 From: David Meyer Date: Sun, 14 Jul 2024 00:34:24 -0400 Subject: [PATCH 7/8] Fix rogue capitalization in tag of two_scales.py --- galleries/examples/subplots_axes_and_figures/two_scales.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/examples/subplots_axes_and_figures/two_scales.py b/galleries/examples/subplots_axes_and_figures/two_scales.py index a33b80045cb0..882fcac7866e 100644 --- a/galleries/examples/subplots_axes_and_figures/two_scales.py +++ b/galleries/examples/subplots_axes_and_figures/two_scales.py @@ -52,6 +52,6 @@ # # .. tags:: # -# component: Axes +# component: axes # plot-type: line # level: beginner From e09882f9c33eeb3fa70f98bbf34cf80d1ef4ffe1 Mon Sep 17 00:00:00 2001 From: David Meyer Date: Wed, 4 Sep 2024 17:09:53 -0400 Subject: [PATCH 8/8] Fix typo Co-authored-by: Elliott Sales de Andrade --- galleries/examples/lines_bars_and_markers/fill_between_demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 62441e5df160..feb325a3f9db 100644 --- a/galleries/examples/lines_bars_and_markers/fill_between_demo.py +++ b/galleries/examples/lines_bars_and_markers/fill_between_demo.py @@ -145,4 +145,4 @@ # styling: conditional # plot-type: fill_between # level: beginner -# prupose: showcase +# purpose: showcase