Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
DOC: Flip the imshow plot types example to match the other examples#28252
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
am back and forth b/c agree that direct comparison is better suited for choosing an appropriate function but a bit unsure about this b/c ideally the plot types gallery would use as many defaults as possible/show the default behavior |
We do put a few non-default kwargs in other examples, like an alpha value. Just added the "after" screenshot to the top level description, does the 1:1 comparison look worthwhile after seeing it? |
Yeah styling, not data reading :/ But yeah the flip option of inverting the first array so the images match is probably more confusing. |
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.
Thinking about this more, on net, better for the functions to be comparable. Also honestly might be good to expose the origin keyword so it doesn't trip folks up in precisely this data arrays read are arranged differently from images way.
f0f204e
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
… to match the other examples
…252-on-v3.9.xBackport PR#28252 on branch v3.9.x (DOC: Flip the imshow plot types example to match the other examples)
I have exactly the opposite take. Folks will use imshow, their plots will be upside down, and they will wonder why that is when this page has the plots all the same. I doubt most people click through to the example to see the use of the origin keyword. I think this change will cause more confusion than not. |
scottshambaugh commentedMay 18, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
So my thought with making this change was:
|
To me, the goal is to show what the same data looks like when plotted with different methods. I think that is best served using the defaults. |
That's why I came around to thinking that showing the use of the origin keyword is helpful. Like the first time I plotted data using imshow it was upside down & I was so confused - and manually flipped it using something like data[::-1] b/c I didn't know about the keyword. |
Theplot types page is primarily to give an overview of the different kinds of visualizations, not teach any of their specifics. In that sense, it doesn't matter too much whether the data/result image is flipped or not. But generally, I'd go with using the functions mostly as is and not doing extra things to hide any specific behavior. So, I'm -0.5 on this, but don't find it important enough to go into a lengthy discussion. |
Uh oh!
There was an error while loading.Please reload this page.
PR summary
Flips the imshow plot types example to put the origin at the lower left instead of the default upper left. This allows for direct comparison with the 6 other examples that use the same data.
Before:

After:

PR checklist