From e8f9926cc2b6be3ab42e4167c8b9b2c0fd5db53a Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Sun, 15 Nov 2020 15:20:29 -0500 Subject: [PATCH 1/7] Update _axes.py for #17708 Update _axes.py to include mentions of rasterization within pcolormesh fixes #17708 --- lib/matplotlib/axes/_axes.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index ef2e6c45f54e..53d18b0e2862 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5833,6 +5833,11 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, and preferred in most cases. For a detailed discussion on the differences see :ref:`Differences between pcolor() and pcolormesh() `. + + .. hint:: + `In order to speed up image processing of a plot with a large amount of points, + pcolormesh allows the use of the `rasterized` keyword. + see :ref https://matplotlib.org/gallery/misc/rasterization_demo.html?highlight=rasterized%20true Parameters ---------- @@ -5924,6 +5929,9 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, snap : bool, default: False Whether to snap the mesh to pixel boundaries. + + rasterized: bool, optional + Force rasterized (bitmap) drawing in vector backend output. Returns ------- From 1fcd069bf9166079b4721243fbda7e8f19de6a9b Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Sun, 15 Nov 2020 15:53:45 -0500 Subject: [PATCH 2/7] Update _axes.py --- lib/matplotlib/axes/_axes.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 53d18b0e2862..a22ccf3765cd 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5833,12 +5833,12 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, and preferred in most cases. For a detailed discussion on the differences see :ref:`Differences between pcolor() and pcolormesh() `. - + .. hint:: `In order to speed up image processing of a plot with a large amount of points, - pcolormesh allows the use of the `rasterized` keyword. - see :ref https://matplotlib.org/gallery/misc/rasterization_demo.html?highlight=rasterized%20true - + pcolormesh allows the use of the `rasterized` keyword. As an example, + see :ref https://matplotlib.org/gallery/misc/rasterization_demo.html`. + Parameters ---------- C : array-like @@ -5929,7 +5929,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, snap : bool, default: False Whether to snap the mesh to pixel boundaries. - + rasterized: bool, optional Force rasterized (bitmap) drawing in vector backend output. From 75240ec2dc64e1a49972efb70bf74b6fe07be830 Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Mon, 16 Nov 2020 17:07:32 -0500 Subject: [PATCH 3/7] Update _axes.py --- lib/matplotlib/axes/_axes.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index a22ccf3765cd..ac8c2b54c5a4 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5833,11 +5833,12 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, and preferred in most cases. For a detailed discussion on the differences see :ref:`Differences between pcolor() and pcolormesh() `. - + .. hint:: - `In order to speed up image processing of a plot with a large amount of points, - pcolormesh allows the use of the `rasterized` keyword. As an example, - see :ref https://matplotlib.org/gallery/misc/rasterization_demo.html`. + `In order to speed up image processing of a plot with a large + amount of points, pcolormesh allows the use of the `rasterized` + keyword. As an example, see + :ref https://matplotlib.org/gallery/misc/rasterization_demo.html`. Parameters ---------- @@ -5929,7 +5930,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, snap : bool, default: False Whether to snap the mesh to pixel boundaries. - + rasterized: bool, optional Force rasterized (bitmap) drawing in vector backend output. From d7cae82961b60c69fbaf7b35a5efc2cf5681a851 Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Mon, 16 Nov 2020 17:11:05 -0500 Subject: [PATCH 4/7] Update _axes.py --- lib/matplotlib/axes/_axes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index ac8c2b54c5a4..32ade6a1a96b 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5835,11 +5835,11 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, `. .. hint:: - `In order to speed up image processing of a plot with a large + `In order to speed up image processing of a plot with a large amount of points, pcolormesh allows the use of the `rasterized` - keyword. As an example, see + keyword. As an example, see :ref https://matplotlib.org/gallery/misc/rasterization_demo.html`. - + Parameters ---------- C : array-like From c9472142d9435c5499ef85d989a8857a9947776b Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Tue, 17 Nov 2020 09:23:26 -0500 Subject: [PATCH 5/7] Update lib/matplotlib/axes/_axes.py Co-authored-by: Jody Klymak --- lib/matplotlib/axes/_axes.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 32ade6a1a96b..28d22a155456 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5835,10 +5835,6 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, `. .. hint:: - `In order to speed up image processing of a plot with a large - amount of points, pcolormesh allows the use of the `rasterized` - keyword. As an example, see - :ref https://matplotlib.org/gallery/misc/rasterization_demo.html`. Parameters ---------- From ca91b72a6189738f578af7eb66c8b4a62bee5f9d Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Tue, 17 Nov 2020 09:23:37 -0500 Subject: [PATCH 6/7] Update lib/matplotlib/axes/_axes.py Co-authored-by: Jody Klymak --- lib/matplotlib/axes/_axes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 28d22a155456..9219ff1dfa00 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5928,7 +5928,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, Whether to snap the mesh to pixel boundaries. rasterized: bool, optional - Force rasterized (bitmap) drawing in vector backend output. + Rasterize the pcolormesh before drawing. Can be faster and make smaller files for large data sets. Returns ------- From d18a83ff654f8665b0363ddb52bf24927ed1c84b Mon Sep 17 00:00:00 2001 From: philip-sparks Date: Tue, 17 Nov 2020 09:29:16 -0500 Subject: [PATCH 7/7] Update _axes.py --- lib/matplotlib/axes/_axes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 9219ff1dfa00..902b56c0fecb 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -5834,7 +5834,6 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, differences see :ref:`Differences between pcolor() and pcolormesh() `. - .. hint:: Parameters ---------- @@ -5928,7 +5927,8 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None, Whether to snap the mesh to pixel boundaries. rasterized: bool, optional - Rasterize the pcolormesh before drawing. Can be faster and make smaller files for large data sets. + Rasterize the pcolormesh before drawing. Can produce images + faster and make smaller files for large data sets. Returns -------