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 report
Bug summary
It appears thatstackplot
fails for small numbers in version 3.2.1, or at least something goes wrong in my clean installation, see figures below.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltx= [0,1]y1=1e-8*np.ones_like(x)y2=1e-9*np.ones_like(x)fig,axs=plt.subplots(2,1)axs[0].stackplot(x,y1,y2)# This plot is fineaxs[1].stackplot(x,y1/10,y2/10)# This plot is wrongplt.show()
Actual outcome
Something went wrong in the second subplot.
Expected outcome
Expected this, as generated withmatplotlib
version 3.1.2
Matplotlib version
- Operating system: macOS 10.12.6 (Sierra)
- Matplotlib version: 3.2.1
- Matplotlib backend (
print(matplotlib.get_backend())
): MacOSX - Python version: 3.8.3
Created a conda environment with only thenumpy
package, then installed matplotlib withpip
.