From 6cd490ee2c9b69554ea542ccf562dadc0ef6d318 Mon Sep 17 00:00:00 2001 From: "Harshal Prakash Patankar (pharshalp)" Date: Fri, 4 Sep 2020 13:42:42 -0400 Subject: [PATCH 1/2] Added a test --- lib/matplotlib/backends/backend_pgf.py | 6 ++++++ lib/matplotlib/tests/test_backend_pgf.py | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/matplotlib/backends/backend_pgf.py b/lib/matplotlib/backends/backend_pgf.py index 4474aa32a3e1..be1b83ff06e7 100644 --- a/lib/matplotlib/backends/backend_pgf.py +++ b/lib/matplotlib/backends/backend_pgf.py @@ -870,6 +870,12 @@ def _print_pgf_to_fh(self, fh, *, writeln(fh, r"\makeatother") writeln(fh, r"\endgroup") + + def draw(self): + # docstring inherited + self.figure.draw(self.get_renderer()) + + def print_pgf(self, fname_or_fh, *args, **kwargs): """ Output pgf macros for drawing the figure so it can be included and diff --git a/lib/matplotlib/tests/test_backend_pgf.py b/lib/matplotlib/tests/test_backend_pgf.py index 702cc6c35870..126fb1e276e7 100644 --- a/lib/matplotlib/tests/test_backend_pgf.py +++ b/lib/matplotlib/tests/test_backend_pgf.py @@ -324,3 +324,16 @@ def test_bbox_inches_tight(tmpdir): ax.imshow([[0, 1], [2, 3]]) fig.savefig(os.path.join(tmpdir, "test.pdf"), backend="pgf", bbox_inches="tight") + + +@needs_pdflatex +@pytest.mark.style('default') +@pytest.mark.backend('pgf') +def test_draw(): + mpl.rcParams['pgf.texsystem'] = 'pdflatex' + fig, ax = plt.subplots() + ax.plot(np.arange(10)) + old_Nticks = len(ax.yaxis.majorTicks) + fig.canvas.draw() + new_Nticks = len(ax.yaxis.majorTicks) + assert old_Nticks != new_Nticks From 3b9fbcfd49434bc218dc06b9bd68a12e2b8f1d91 Mon Sep 17 00:00:00 2001 From: "Harshal Prakash Patankar (pharshalp)" Date: Tue, 25 Feb 2020 23:23:05 -0500 Subject: [PATCH 2/2] [ci skip] testing if I can disable azure --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a5c8544b7e88..a46ea3dac031 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +2,8 @@ # Create and test a Python package on multiple Python versions. # Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more: # https://docs.microsoft.com/azure/devops/pipelines/languages/python +pr: none +trigger: none strategy: matrix: 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