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 output of ax.plot(x,y) disappears while changing y_scale from 'log' (initial scale for the y axis) to 'linear'.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltsamples=np.random.normal(size=1000)x=np.linspace(-5,5,1000)fig,ax=plt.subplots()ax.hist(samples,log=True,density=True)ax.plot(x,np.exp(-x**2/2)/np.sqrt(2*np.pi))fig.savefig('log.pdf')ax.set_yscale('linear')fig.savefig('lin.pdf')
Actual outcome
Expected outcome
Additional information
The expected outcome is generated with matplotlib==3.5.3
fill_between and hist are working fine.
Operating system
MacOSX
Matplotlib Version
3.6.3
Matplotlib Backend
MacOSX
Python version
3.9.13
Jupyter version
No response
Installation
pip