-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Pass linewidth to Mac context properly #1209
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
Conversation
I think I am still missing some things. For example, the tick marks still don't match those using the |
Here's what the interactive And after the change: These plots were done with @efiring's test script: import numpy as np
import matplotlib
matplotlib.use("macosx")
matplotlib.rcParams['figure.dpi'] = 240
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1, figsize=(3,2)) # 2 inches high
ax.plot([1,2,3], lw=72) # line 1 inch wide
fig.savefig("testdpi.png", dpi=240)
plt.show() |
Are there any other properties that are missing? Maybe linestyles and such? @pmarshwx, this PR might be of interest to you with the problem you discovered during SciPy 2012. |
Things like Edit: Though, it is possible I may have missed something. Perhaps I should add some sort of test for this? |
I don't think we have any way of testing this sort of thing automatically. |
There are probably other ways to do what I have done, perhaps better ways, so his feedback would certainly be appreciated. Thanks. |
Marking this for 1.2.x, as it's really a follow-on to #786. |
It's nice to fix this for linewidth, but I wonder if we couldn't also fix this at a deeper level and also resolve #113? (I say this having not looked at the code at all...) |
@mdboom, if Michiel can look at it this weekend and either approve @dmcdougall's PR or come up with a better one, why shouldn't this go into 1.2? I think this PR does address all of the aspects that have been clearly identified, and the changes it makes are simple. |
@efiring: I think we're in agreement. I think this should go into 1.2. |
@dmcdougall: This looks good to go. Is there anything else from your end? |
@mdboom In short, no. I consider this ready to merge. The long answer is: I'd like to also solve the dpi issue in the osx backend, but I think I will do that in a different PR. I feel passing in the dpi like this sets up the necessary groundwork for extending a to a solution for that problem. |
Pass linewidth to Mac context properly
Attempt to fix #786.