-
Notifications
You must be signed in to change notification settings - Fork 891
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
update selection of interpolation methods #80
Conversation
I actually am not sure we should advertise these so exhaustively. It takes a lot of space for something that is pretty advanced. 'none' otoh probably should not be dropped? |
It seemed that there was some consensus in #28 that While I agree that a 3x3 grid of 9 common interpolations may be sufficient, that does leave the question of what to put in the resulting open space. Maybe this is best addressed in a separate issue/PR (see #81). |
I suspect the right thing to do here is to make sure the pcolormesh objects are rasterized so that the result of "none" does not depend on the pdf viewer. However "none" is very heavily used (for better or worse) so I think it would be odd to not document how it works in the cheat sheet. |
@jimustafa are we publishing the artifacts from CI anywhere? |
Yes @jklymak, the cheatsheets and handouts are saved as build artifacts during workflow execution, and published to the cheatsheets/.github/workflows/main.yaml Lines 57 to 70 in efd4431
|
but only if its a merge to master, right? |
While the artifacts are saved for each build, publishing to |
Yeah, but I never know where the artifacts are stored. Probably just me not seeing a button somewhere... |
They're on the Summary page, e.g., https://github.com/matplotlib/cheatsheets/actions/runs/1433495962 |
@@ -13,7 +13,7 @@ | |||
subplot_kw={'xticks': [], 'yticks': []}) | |||
for ax, interp_method in zip(axs.flat, methods): | |||
ax.imshow(Z, interpolation=interp_method, cmap='viridis', | |||
extent=[0,9,0,9]) | |||
extent=[0,9,0,9], rasterized=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jklymak. Is this what you were suggesting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so. Did it work? After suggesting it, I wasn't sure if imshow
rasterized, but I'm pretty sure it does.
This looks fine in my viewer. I think rasterizing it is the right way to go to make it clear what the differences are. OTOH, the reader is definitely going to be confused as to what None/none/nearest all mean in this context. If I were doing this I would have a section:
and a different section
the fact of the matter is that for over-sampled images (many more pixels than data) "none" is a perfectly sensible choice. For under-sampled data (fewer pixels than data) "none" is almost always aliased and should be low-passed first. See https://matplotlib.org/devdocs/gallery/images_contours_and_fields/image_antialiasing.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the right fix for a consistent display.
Attempts to address #28.
'none'
withblackman
Something else to consider would be making the image data the same as what is used in the current matplotlib gallery example for the interpolation methods. To that effect, I could add a commit to this PR.