From 6735c352e192b3cc732fdf0e5be6e4f82df0a69f Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 5 May 2015 15:09:44 -0400 Subject: [PATCH 1/3] Fix path length limit --- src/_backend_agg.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_backend_agg.cpp b/src/_backend_agg.cpp index 36ff8a268da7..a2edfd77e13e 100644 --- a/src/_backend_agg.cpp +++ b/src/_backend_agg.cpp @@ -46,7 +46,7 @@ RendererAgg::RendererAgg(unsigned int width, unsigned int height, double dpi) rendererBase(), rendererAA(), rendererBin(), - theRasterizer(4096), + theRasterizer(8192), lastclippath(NULL), _fill_color(agg::rgba(1, 1, 1, 0)) { From 164124cf8b2941687b22cbc1dba9c9c317acfaf1 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 10 Jun 2015 08:49:58 -0400 Subject: [PATCH 2/3] Add long path test --- lib/matplotlib/tests/test_agg.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/matplotlib/tests/test_agg.py b/lib/matplotlib/tests/test_agg.py index 7a81166425eb..60c71e0d21a6 100644 --- a/lib/matplotlib/tests/test_agg.py +++ b/lib/matplotlib/tests/test_agg.py @@ -144,6 +144,17 @@ def test_marker_with_nan(): fig.savefig(buf, format='png') +@cleanup +def test_long_path(): + buff = io.BytesIO() + + fig, ax = plt.subplots() + with np.random.seed(0): + points = np.random.rand(70000) + ax.plot(points) + fig.savefig(buff, format='png') + + if __name__ == "__main__": import nose nose.runmodule(argv=['-s', '--with-doctest'], exit=False) From 042cbb684a2233e9ef3b39345ab5876b2155c8f7 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 10 Jun 2015 09:12:31 -0400 Subject: [PATCH 3/3] No context manager of seed -- bummer --- lib/matplotlib/tests/test_agg.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/tests/test_agg.py b/lib/matplotlib/tests/test_agg.py index 60c71e0d21a6..1618a52c03cf 100644 --- a/lib/matplotlib/tests/test_agg.py +++ b/lib/matplotlib/tests/test_agg.py @@ -149,10 +149,10 @@ def test_long_path(): buff = io.BytesIO() fig, ax = plt.subplots() - with np.random.seed(0): - points = np.random.rand(70000) - ax.plot(points) - fig.savefig(buff, format='png') + np.random.seed(0) + points = np.random.rand(70000) + ax.plot(points) + fig.savefig(buff, format='png') if __name__ == "__main__":