From bd60fd530e7c9c5fb0cbc126d54a596e2eba9813 Mon Sep 17 00:00:00 2001 From: Patrick Seitz Date: Sat, 25 Nov 2023 18:36:45 -0500 Subject: [PATCH 1/5] [Doc] Updated Hatches API page Co-authored-by: Md Ashhar --- doc/api/hatch_api.rst | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst index b706be379a15..989922b1a72a 100644 --- a/doc/api/hatch_api.rst +++ b/doc/api/hatch_api.rst @@ -2,7 +2,32 @@ ``matplotlib.hatch`` ******************** +.. plot:: + :include-source: false + :alt: Example image showing hatching patterns with level 1 density. + + import matplotlib.pyplot as plt + + from matplotlib.patches import Rectangle + + fig, axs = plt.subplots(2, 5, layout='constrained', figsize=(6.4, 3.2)) + + hatches = ['/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'] + + def hatches_plot(ax, h): + ax.add_patch(Rectangle((0, 0), 2, 2, fill=False, hatch=h)) + ax.text(1, -0.5, f"' {h} '", size=15, ha="center") + ax.axis('equal') + ax.axis('off') + + for ax, h in zip(axs.flat, hatches): + hatches_plot(ax, h) + + +For examples using the hatch api refer to: :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py` + + .. automodule:: matplotlib.hatch :members: :undoc-members: - :show-inheritance: + :show-inheritance: \ No newline at end of file From 852e66c3ca739c3334d05a0cef829b99825fc9c0 Mon Sep 17 00:00:00 2001 From: Patrick Seitz Date: Mon, 27 Nov 2023 17:52:59 -0500 Subject: [PATCH 2/5] Addressed review feedback --- doc/api/hatch_api.rst | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst index 989922b1a72a..24c6ef28b67b 100644 --- a/doc/api/hatch_api.rst +++ b/doc/api/hatch_api.rst @@ -2,26 +2,9 @@ ``matplotlib.hatch`` ******************** -.. plot:: - :include-source: false +.. image:: ../gallery/shapes_and_collections/images/sphx_glr_hatch_style_reference_001.png + :align: center :alt: Example image showing hatching patterns with level 1 density. - - import matplotlib.pyplot as plt - - from matplotlib.patches import Rectangle - - fig, axs = plt.subplots(2, 5, layout='constrained', figsize=(6.4, 3.2)) - - hatches = ['/', '\\', '|', '-', '+', 'x', 'o', 'O', '.', '*'] - - def hatches_plot(ax, h): - ax.add_patch(Rectangle((0, 0), 2, 2, fill=False, hatch=h)) - ax.text(1, -0.5, f"' {h} '", size=15, ha="center") - ax.axis('equal') - ax.axis('off') - - for ax, h in zip(axs.flat, hatches): - hatches_plot(ax, h) For examples using the hatch api refer to: :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py` @@ -30,4 +13,4 @@ For examples using the hatch api refer to: :ref:`sphx_glr_gallery_shapes_and_col .. automodule:: matplotlib.hatch :members: :undoc-members: - :show-inheritance: \ No newline at end of file + :show-inheritance: From 5433b2f70f427eb08a3d8908b11e61385ab19e36 Mon Sep 17 00:00:00 2001 From: Patrick Seitz Date: Mon, 27 Nov 2023 19:01:10 -0500 Subject: [PATCH 3/5] Fixed image path --- doc/api/hatch_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst index 24c6ef28b67b..59bad443eecf 100644 --- a/doc/api/hatch_api.rst +++ b/doc/api/hatch_api.rst @@ -2,7 +2,7 @@ ``matplotlib.hatch`` ******************** -.. image:: ../gallery/shapes_and_collections/images/sphx_glr_hatch_style_reference_001.png +.. image:: /gallery/shapes_and_collections/images/sphx_glr_hatch_style_reference_001.png :align: center :alt: Example image showing hatching patterns with level 1 density. From 241d45a1d9fba2d1f61a2225359343c59dddccc8 Mon Sep 17 00:00:00 2001 From: Patrick Seitz Date: Wed, 29 Nov 2023 23:02:30 -0500 Subject: [PATCH 4/5] Addressed review feedback v2 --- doc/api/hatch_api.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst index 59bad443eecf..e68266b5b369 100644 --- a/doc/api/hatch_api.rst +++ b/doc/api/hatch_api.rst @@ -2,13 +2,15 @@ ``matplotlib.hatch`` ******************** +For examples using the hatch api refer to: :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py` + +Example image showing hatching patterns with level 1 density. + .. image:: /gallery/shapes_and_collections/images/sphx_glr_hatch_style_reference_001.png :align: center :alt: Example image showing hatching patterns with level 1 density. - -For examples using the hatch api refer to: :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py` - +| .. automodule:: matplotlib.hatch :members: From 1c848879bc532d62aa37a51c92b019a2ee6a419a Mon Sep 17 00:00:00 2001 From: Patrick Seitz Date: Wed, 29 Nov 2023 23:59:08 -0500 Subject: [PATCH 5/5] Addressed review feedback v3 --- doc/api/hatch_api.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/hatch_api.rst b/doc/api/hatch_api.rst index e68266b5b369..9df1fa446c0e 100644 --- a/doc/api/hatch_api.rst +++ b/doc/api/hatch_api.rst @@ -2,13 +2,13 @@ ``matplotlib.hatch`` ******************** -For examples using the hatch api refer to: :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py` +For examples using the hatch api refer to :ref:`sphx_glr_gallery_shapes_and_collections_hatch_style_reference.py`. -Example image showing hatching patterns with level 1 density. +Example image showing all supported hatching patterns at level 1 density. .. image:: /gallery/shapes_and_collections/images/sphx_glr_hatch_style_reference_001.png :align: center - :alt: Example image showing hatching patterns with level 1 density. + :alt: Example image showing all supported hatching patterns at level 1 density. | pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy