-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug
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
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
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
Metadata
Metadata
Assignees
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.status: confirmed bug