Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43d1f92

Browse files
committed
Merge pull request #4408 from mdboom/path-length-limit
Fix: path length limit
2 parents d4c8700 + 042cbb6 commit 43d1f92

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/matplotlib/tests/test_agg.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,17 @@ def test_marker_with_nan():
144144
fig.savefig(buf, format='png')
145145

146146

147+
@cleanup
148+
def test_long_path():
149+
buff = io.BytesIO()
150+
151+
fig, ax = plt.subplots()
152+
np.random.seed(0)
153+
points = np.random.rand(70000)
154+
ax.plot(points)
155+
fig.savefig(buff, format='png')
156+
157+
147158
if __name__ == "__main__":
148159
import nose
149160
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

src/_backend_agg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ RendererAgg::RendererAgg(unsigned int width, unsigned int height, double dpi)
4646
rendererBase(),
4747
rendererAA(),
4848
rendererBin(),
49-
theRasterizer(4096),
49+
theRasterizer(8192),
5050
lastclippath(NULL),
5151
_fill_color(agg::rgba(1, 1, 1, 0))
5252
{

0 commit comments

Comments
 (0)