Skip to content

Commit

Permalink
Use a unique output-base-name for each plot directive
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer committed Oct 11, 2024
1 parent a61d224 commit a9cf839
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/indexing-guide/multidimensional-indices/boolean-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ both. -->
.. plot::
:context: reset
:include-source: True
:output-base-name: plot-{counter}
:output-base-name: function-plot
:alt: A plot of 4*x*np.sin(x) - x**2/4 - 2*x from -10 to 10. The curve crosses the x-axis several times at irregular intervals.
:caption: Plot of :math:`y = 4x\sin(x) - \frac{x^2}{4} - 2x`
Expand All @@ -194,7 +194,7 @@ to do this is to select them using a mask:
.. plot::
:context: close-figs
:include-source: True
:output-base-name: plot-{counter}
:output-base-name: function-plot-masked
:alt: A plot of only the parts of 4*x*np.sin(x) - x**2/4 - 2*x that are above the x-axis.
:caption: Plot of :math:`y = 4x\sin(x) - \frac{x^2}{4} - 2x` where :math:`y > 0`
Expand Down Expand Up @@ -387,7 +387,7 @@ For example, say we have an image represented in
.. plot::
:context: reset
:include-source: True
:output-base-name: astronaut-{counter}
:output-base-name: astronaut
:alt: An image of an astronaut, which is represented as a shape (512, 512, 3) array.
>>> def imshow(image, title):
Expand All @@ -410,7 +410,7 @@ value (the second value in the last dimension, which should always be between
.. plot::
:context: close-figs
:include-source: True
:output-base-name: astronaut-{counter}
:output-base-name: astronaut-saturated-
:alt: An image of an astronaut with increased saturation. The lighter parts of the image appear washed out.
>>> from skimage import color
Expand All @@ -429,7 +429,7 @@ saturation of only those pixels:
.. plot::
:context: close-figs
:include-source: True
:output-base-name: astronaut-{counter}
:output-base-name: astronaut-saturated-better
:alt: An image of an astronaut with increased saturation. The image does not appear washed out.
>>> hsv_image = color.rgb2hsv(image)
Expand Down

0 comments on commit a9cf839

Please sign in to comment.