Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adding tags to many examples #28569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions galleries/examples/color/color_by_yvalue.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@
# in this example:
#
# - `matplotlib.axes.Axes.plot` / `matplotlib.pyplot.plot`
#
# .. tags::
#
# styling: color
# styling: conditional
# plot-type: line
# level: beginner
7 changes: 7 additions & 0 deletions galleries/examples/color/color_cycle_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions galleries/examples/color/color_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions galleries/examples/color/colorbar_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions galleries/examples/color/colormap_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions galleries/examples/color/custom_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,9 @@
# - `matplotlib.cm`
# - `matplotlib.cm.ScalarMappable.set_cmap`
# - `matplotlib.cm.ColormapRegistry.register`
#
# .. tags::
#
# styling: colormap
# plot-type: imshow
# level: intermediate
7 changes: 7 additions & 0 deletions galleries/examples/color/individual_colors_from_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,10 @@
#
# - `matplotlib.colors.Colormap`
# - `matplotlib.colors.Colormap.resampled`
#
# .. tags::
#
# component: colormap
# styling: color
# plot-type: line
# level: intermediate
5 changes: 5 additions & 0 deletions galleries/examples/color/named_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions galleries/examples/color/set_alpha.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@
#
# - `matplotlib.axes.Axes.bar`
# - `matplotlib.pyplot.subplots`
#
# .. tags::
#
# styling: color
# plot-type: bar
# level: beginner
7 changes: 7 additions & 0 deletions galleries/examples/lines_bars_and_markers/bar_colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@
ax.legend(title='Fruit color')

plt.show()

# %%
# .. tags::
#
# styling: color
# plot-style: bar
# level: beginner
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/bar_label_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/bar_stacked.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@
ax.legend(loc="upper right")

plt.show()

# %%
# .. tags::
#
# plot-type: bar
# level: beginner
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/barchart.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/barh.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@
ax.set_title('How fast do you want to go today?')

plt.show()

# %%
# .. tags::
#
# plot-type: bar
# level: beginner
7 changes: 7 additions & 0 deletions galleries/examples/lines_bars_and_markers/broken_barh.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@
horizontalalignment='right', verticalalignment='top')

plt.show()

# %%
# .. tags::
#
# component: annotation
# plot-type: bar
# level: beginner
5 changes: 5 additions & 0 deletions galleries/examples/lines_bars_and_markers/capstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@

CapStyle.demo()
plt.show()

# %%
# .. tags::
#
# purpose: reference
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@
ax.legend()

plt.show()

# %%
# .. tags::
#
# plot-type: specialty
# level: beginner
7 changes: 7 additions & 0 deletions galleries/examples/lines_bars_and_markers/cohere.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@
axs[1].set_ylabel('Coherence')

plt.show()

# %%
# .. tags::
#
# domain: signal-processing
# plot-type: line
# level: beginner
7 changes: 7 additions & 0 deletions galleries/examples/lines_bars_and_markers/csd_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@
ax2.set_ylabel('CSD (dB)')

plt.show()

# %%
# .. tags::
#
# domain: signal-processing
# plot-type: line
# level: beginner
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/curve_error_band.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@
# in this example:
#
# - `matplotlib.axes.Axes.errorbar` / `matplotlib.pyplot.errorbar`
#
# .. tags::
#
# component: error
# plot-type: errorbar
# level: beginner
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@

fig.suptitle('Errorbar subsampling')
plt.show()

# %%
# .. tags::
#
# component: error
# plot-type: errorbar
# level: beginner
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@

# display the plot
plt.show()

# %%
# .. tags::
#
# plot-type: eventplot
# level: intermediate
7 changes: 7 additions & 0 deletions galleries/examples/lines_bars_and_markers/eventplot_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,10 @@
linelengths=linelengths2, orientation='vertical')

plt.show()

# %%
# .. tags::
#
# plot-type: eventplot
# level: beginner
# purpose: showcase
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
# purpose: showcase
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions galleries/examples/lines_bars_and_markers/gradient_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/hat_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions galleries/examples/lines_bars_and_markers/joinstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@

JoinStyle.demo()
plt.show()

# %%
# .. tags:: purpose: reference, styling: linestyle
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@

ax.legend(handlelength=4)
plt.show()

# %%
# .. tags::
#
# styling: linestyle
# plot-style: line
# level: beginner
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@
ax.legend()

plt.show()

# %%
# .. tags::
#
# styling: linestyle
# plot-type: line
# level: beginner
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/linestyles.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,9 @@ def plot_linestyles(ax, linestyles, title):

plt.tight_layout()
plt.show()

# %%
# .. tags::
#
# styling: linestyle
# purpose: reference
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/marker_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,9 @@ def split_list(a_list):
format_axes(ax)

plt.show()

# %%
# .. tags::
#
# component: marker
# purpose: reference
7 changes: 7 additions & 0 deletions galleries/examples/lines_bars_and_markers/markevery_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,10 @@
ax.plot(theta, r, 'o', ls='-', ms=4, markevery=markevery)

plt.show()

# %%
# .. tags::
#
# component: marker
# plot-type: line
# level: beginner
6 changes: 6 additions & 0 deletions galleries/examples/lines_bars_and_markers/masked_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@
plt.legend()
plt.title('Masked and NaN data')
plt.show()

# %%
# .. tags::
#
# plot-type: line
# level: intermediate
Loading