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
import numpy as np
import matplotlib.pyplot as plt
samples = 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
lin.pdf
log.pdf
Expected outcome
lin.pdf
log.pdf
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
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
Actual outcome
lin.pdf
log.pdf
Expected outcome
lin.pdf
log.pdf
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