Closed as not planned
Description
Bug summary
The default dpi='figure'
option in savefig
no longer appears to work correctly - instead the DPI is a fixed value.
Code for reproduction
import matplotlib.pyplot as plt
fig = plt.figure()
fig.set_dpi(10)
ax = fig.add_subplot(1, 1, 1)
fig.savefig("test_dpi.png", dpi="figure")
Actual outcome
A 100 DPI figure:
Expected outcome
A 10 DPI figure:
Additional information
I bisected this and it appears to have been introduced in #19126 - prior to this, it worked fine.
Operating system
All platforms
Matplotlib Version
Bug first appeared in Matplotlib 3.5
Matplotlib Backend
MacOS X and Agg
Python version
3.11 but seen in other Python versions
Jupyter version
No response
Installation
pip