-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
matplotlib dev: What happened to figure.dpi ? #19928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This comment has been minimized.
This comment has been minimized.
Update: Okay, I did manage to bisect and
#!/bin/sh
python run_me.py
import matplotlib.pyplot as plt
import numpy as np
from astropy.io import fits
from astropy.wcs import WCS
TARGET_HEADER = fits.Header.fromstring("""
NAXIS = 2
NAXIS1 = 200
NAXIS2 = 100
CTYPE1 = 'RA---MOL'
CRPIX1 = 500
CRVAL1 = 180.0
CDELT1 = -0.4
CUNIT1 = 'deg '
CTYPE2 = 'DEC--MOL'
CRPIX2 = 400
CRVAL2 = 0.0
CDELT2 = 0.4
CUNIT2 = 'deg '
COORDSYS= 'icrs '
""", sep='\n')
def run():
ax = plt.subplot(1, 1, 1, projection=WCS(TARGET_HEADER))
ax.imshow(np.zeros((100, 200)))
ax.coords.grid(color='white', grid_type='contours')
plt.savefig('test.png')
if __name__ == '__main__':
run() |
It is pretty hard to see how #19703 could have caused any downstream issues since it doesn't change anything user facing, except to add a new style. I'm not convinced this is Matplotlib's issue: import matplotlib.pyplot as plt
import numpy as np
ax = plt.subplot(1, 1, 1, projection='polar')
ax.imshow(np.zeros((100, 200)))
plt.savefig('test.png') works fine on master. |
Indeed, I couldn't reproduce this if I take out the |
I'm going to close for now because this has gotten a bit confusing, but feel free to open a new issue if you narrow it down to something we broke. Thanks again for testing us early on! |
The issue is not that |
I think I did the bisect wrong. It gives me different answer depending on where I set the "good". I can't seem to find an option that is equivalent to The only thing I am sure of is that this is caused by something that got merged in the past 24-36 hours (as of writing). Let's just wait for Tom Robitaille and Stuart Mumford's inputs. I don't usually work with that part of the code, and I need to move on to other work. Thanks, everyone! |
This morning, we got a new error testing against matplotlib dev. Example log at https://app.circleci.com/pipelines/github/astropy/astropy/4691/workflows/582b72af-3420-4af5-a185-f0e41601edfd/jobs/86623
bisect attempt
d49696a is the first bad commit
Update: I don't think this is true actually... I have no idea what is going on
I think I traced it to https://github.com/astropy/astropy/blob/796b585f989319b766979df2110e0b4fa94a43a1/astropy/visualization/mpl_style.py#L63 . However, I am not sure if I should simply remove this setting or there is a new way to set it. Any advise would be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: