From c21f5a5fe9ab30de3d9ea07d16897310bf4d3abf Mon Sep 17 00:00:00 2001 From: esibinga Date: Fri, 4 Aug 2023 07:47:28 -0400 Subject: [PATCH 1/2] small cleanup projects: - add link to axes intro in user guide - remove text that doesn't belong in gallery example - add descriptive titles to dolphins, donuts, and firefox --- galleries/examples/color/color_demo.py | 27 +------------------ .../shapes_and_collections/dolphin.py | 4 +-- .../examples/shapes_and_collections/donut.py | 4 +-- galleries/examples/showcase/anatomy.py | 2 ++ galleries/examples/showcase/firefox.py | 2 +- 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/galleries/examples/color/color_demo.py b/galleries/examples/color/color_demo.py index 8c4b7756cc3e..c33d94e61f94 100644 --- a/galleries/examples/color/color_demo.py +++ b/galleries/examples/color/color_demo.py @@ -3,32 +3,7 @@ Color Demo ========== -Matplotlib recognizes the following formats to specify a color: - -1) an RGB or RGBA tuple of float values in ``[0, 1]`` (e.g. ``(0.1, 0.2, 0.5)`` - or ``(0.1, 0.2, 0.5, 0.3)``). RGBA is short for Red, Green, Blue, Alpha; -2) a hex RGB or RGBA string (e.g., ``'#0F0F0F'`` or ``'#0F0F0F0F'``); -3) a shorthand hex RGB or RGBA string, equivalent to the hex RGB or RGBA - string obtained by duplicating each character, (e.g., ``'#abc'``, equivalent - to ``'#aabbcc'``, or ``'#abcd'``, equivalent to ``'#aabbccdd'``); -4) a string representation of a float value in ``[0, 1]`` inclusive for gray - level (e.g., ``'0.5'``); -5) a single letter string, i.e. one of - ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``, which are short-hand notations - for shades of blue, green, red, cyan, magenta, yellow, black, and white; -6) a X11/CSS4 ("html") color name, e.g. ``"blue"``; -7) a name from the `xkcd color survey `__, - prefixed with ``'xkcd:'`` (e.g., ``'xkcd:sky blue'``); -8) a "Cn" color spec, i.e. ``'C'`` followed by a number, which is an index into - the default property cycle (:rc:`axes.prop_cycle`); the indexing is intended - to occur at rendering time, and defaults to black if the cycle does not - include color. -9) one of ``{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', - 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan'}`` which are - the Tableau Colors from the 'tab10' categorical palette (which is the - default color cycle); - -For more information on colors in matplotlib see +For more in-depth information on colors in matplotlib see * the :ref:`colors_def` tutorial; * the `matplotlib.colors` API; diff --git a/galleries/examples/shapes_and_collections/dolphin.py b/galleries/examples/shapes_and_collections/dolphin.py index 0fcd67284ab5..b51730fcccac 100644 --- a/galleries/examples/shapes_and_collections/dolphin.py +++ b/galleries/examples/shapes_and_collections/dolphin.py @@ -1,9 +1,9 @@ """ ======== -Dolphins +Draw and manipulate dolphin shape ======== -This example shows how to draw, and manipulate shapes given vertices +This example shows how to draw and manipulate shapes, given vertices and nodes using the `~.path.Path`, `~.patches.PathPatch` and `~matplotlib.transforms` classes. """ diff --git a/galleries/examples/shapes_and_collections/donut.py b/galleries/examples/shapes_and_collections/donut.py index 464075336279..d67a2abae165 100644 --- a/galleries/examples/shapes_and_collections/donut.py +++ b/galleries/examples/shapes_and_collections/donut.py @@ -1,9 +1,9 @@ r""" ============= -Mmh Donuts!!! +Draw Donuts with Path and PathPatch ============= -Draw donuts (miam!) using `~.path.Path`\s and `~.patches.PathPatch`\es. +Mmh... draw donuts (miam!) using `~.path.Path`\s and `~.patches.PathPatch`\es. This example shows the effect of the path's orientations in a compound path. """ diff --git a/galleries/examples/showcase/anatomy.py b/galleries/examples/showcase/anatomy.py index b1fbde9c8d7b..de08d7825583 100644 --- a/galleries/examples/showcase/anatomy.py +++ b/galleries/examples/showcase/anatomy.py @@ -4,6 +4,8 @@ =================== This figure shows the name of several matplotlib elements composing a figure + +To see detailed information, see :ref:`axes_intro`. """ diff --git a/galleries/examples/showcase/firefox.py b/galleries/examples/showcase/firefox.py index 65682ccd7429..5278802fcfda 100644 --- a/galleries/examples/showcase/firefox.py +++ b/galleries/examples/showcase/firefox.py @@ -1,6 +1,6 @@ """ ======= -Firefox +Firefox logo with path and patches ======= This example shows how to create the Firefox logo with path and patches. From a7bc6da7ff1d52b53ed9b250688d05e92a8a1945 Mon Sep 17 00:00:00 2001 From: esibinga Date: Fri, 18 Aug 2023 07:25:09 -0400 Subject: [PATCH 2/2] add === lines and remove tutorial language --- galleries/examples/color/color_demo.py | 2 +- galleries/examples/shapes_and_collections/dolphin.py | 4 ++-- galleries/examples/shapes_and_collections/donut.py | 4 ++-- galleries/examples/showcase/firefox.py | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/galleries/examples/color/color_demo.py b/galleries/examples/color/color_demo.py index c33d94e61f94..e185770c8169 100644 --- a/galleries/examples/color/color_demo.py +++ b/galleries/examples/color/color_demo.py @@ -5,7 +5,7 @@ For more in-depth information on colors in matplotlib see -* the :ref:`colors_def` tutorial; +* :ref:`colors_def`; * the `matplotlib.colors` API; * the :doc:`/gallery/color/named_colors` example. """ diff --git a/galleries/examples/shapes_and_collections/dolphin.py b/galleries/examples/shapes_and_collections/dolphin.py index b51730fcccac..e69681ba509c 100644 --- a/galleries/examples/shapes_and_collections/dolphin.py +++ b/galleries/examples/shapes_and_collections/dolphin.py @@ -1,7 +1,7 @@ """ -======== +================================= Draw and manipulate dolphin shape -======== +================================= This example shows how to draw and manipulate shapes, given vertices and nodes using the `~.path.Path`, `~.patches.PathPatch` and diff --git a/galleries/examples/shapes_and_collections/donut.py b/galleries/examples/shapes_and_collections/donut.py index d67a2abae165..22a4c65ab208 100644 --- a/galleries/examples/shapes_and_collections/donut.py +++ b/galleries/examples/shapes_and_collections/donut.py @@ -1,7 +1,7 @@ r""" -============= +=================================== Draw Donuts with Path and PathPatch -============= +=================================== Mmh... draw donuts (miam!) using `~.path.Path`\s and `~.patches.PathPatch`\es. This example shows the effect of the path's orientations in a compound path. diff --git a/galleries/examples/showcase/firefox.py b/galleries/examples/showcase/firefox.py index 5278802fcfda..4a70032e8d51 100644 --- a/galleries/examples/showcase/firefox.py +++ b/galleries/examples/showcase/firefox.py @@ -1,7 +1,7 @@ """ -======= +================================== Firefox logo with path and patches -======= +================================== This example shows how to create the Firefox logo with path and patches. """