Giter VIP home page Giter VIP logo

Comments (5)

rougier avatar rougier commented on May 22, 2024 1

Can't we used a logspace for X and Y with the "default" imshow pattern ? That would be a nice use case.

from cheatsheets.

rougier avatar rougier commented on May 22, 2024

Cheatsheets are meant to give a quick overview of the main functions and I had to make some choices. Regarding pcolormesh and imshow, I don't know if we have usage statistics but from the gallery, I think there are mostly examples using imshow and not so many using pcolormesh. But I may be wrong.

from cheatsheets.

jklymak avatar jklymak commented on May 22, 2024

I wouldn't suggest pcolormesh instead of imshow. Perhaps pcolormesh instead of xcorr? xcorr is just a light wrapper around np.correlate and stem.

The point of pcolormesh is that it works properly with unequally spaced x and y. If someone mistakenly uses imshow in that circumstance, their image will be off. imshow also lays things out upside down unless you are explicitly looking at an image. Finally it has the wacky "extent" kwargs which interact so strangely with the limits and the "origin" kwarg that we have to have a whole "intermediate" tutorial to explain it (https://matplotlib.org/stable/tutorials/intermediate/imshow_extent.html)... Of course, the way we implement pcolormesh has its quirks as well ;-)

from cheatsheets.

rougier avatar rougier commented on May 22, 2024

I would need to think of an illustrative usage case. From the galley, I found only one.

from cheatsheets.

jklymak avatar jklymak commented on May 22, 2024

I used the same data that you used for contour in both imshow and pcolormesh. For the pcolormesh, I made dx vary in the x vector, just to show that was possible:

https://github.com/matplotlib/matplotlib/pull/19703/files

from cheatsheets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.