Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Description
Bug report
It takes a long time when I plot long not-solid vline, set short ylim and save it.
The same bug happens at hline and xlim.
Code for reproduction
importmatplotlib.pyplotaspltimporttimeymax=1e7plt.figure()plt.ylim(0,ymax)plt.vlines(0,ymin=0,ymax=ymax,linestyles='dashed')t0=time.time()plt.savefig("test_0")# short timet1=time.time()print("{:.2f} [s]".format(t1-t0))plt.ylim(0,1)t2=time.time()plt.savefig("test_1")# long timet3=time.time()print("{:.2f} [s]".format(t3-t2))
Actual outcome
0.07 [s]93.95 [s]
Matplotlib version
- Operating system: Windows 10 Pro (64 bit)
- Matplotlib version: 3.0.3
- Matplotlib backend (
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inline - Python version: 3.6.8
- Jupyter version (if applicable): jupyter core: 4.5.0, jupyter-notebook: 6.0.0