Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug summary
The keyword argumenttransform
of the method ax.plot(...) malfunctions with size of the samples greater than 1000.
For example, the following script
import numpy as npimport matplotlib.pyplot as pltimport matplotlib.transforms as transformsax = plt.gca()xx = np.linspace(0.0, 4 * np.pi, num=1001)yy = np.cos(xx)t = transforms.Affine2D().translate(10.0, 0.0).scale(2.0, 0.5)lines = ax.plot(xx, yy, transform=t + ax.transData)plt.show()
Produces an expected figure
withnum=1000
and an empty figure
withnum=1001
.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlib.transformsastransformsax=plt.gca()xx=np.linspace(0.0,4*np.pi,num=1001)yy=np.cos(xx)t=transforms.Affine2D().translate(10.0,0.0).scale(2.0,0.5)lines=ax.plot(xx,yy,transform=t+ax.transData)plt.show()
Actual outcome
Expected outcome
Operating system
Linux
Matplotlib Version
3.4.3
Matplotlib Backend
Qt5Agg
Python version
Python 3.8.7
Jupyter version
No response
Other libraries
No response
Installation
pip
Conda channel
No response