Skip to content

[Feature Request]: df.plot(type='heatmap') #19008

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

Closed
alexlenail opened this issue Dec 30, 2017 · 5 comments
Closed

[Feature Request]: df.plot(type='heatmap') #19008

alexlenail opened this issue Dec 30, 2017 · 5 comments

Comments

@alexlenail
Copy link
Contributor

alexlenail commented Dec 30, 2017

A heatmap is a way of visualizing a matrix:
image

It's particularly common in biology / bioinformatics. It makes for a good way to begin to form hypotheses about the latent structure in some data.

There exists a library which can produce heatmaps in python, specifically seaborn. However, the fact this feature already exists in another library doesn't necessarily mean it shouldn't exist here -- after all, both libraries provide bar plots, scatter plots, etc... And secondly, the seaborn implementation is very slow relative to R's heatmap plotting, so there's room for a faster implementation in the python world.

I'd love to see a new, faster heatmap implementation added to pandas. Would make my life much, much easier.

@jreback
Copy link
Contributor

jreback commented Dec 30, 2017

can you point to the code that implements this in seaborn? (for reference)

@alexlenail
Copy link
Contributor Author

@jreback
Copy link
Contributor

jreback commented Dec 30, 2017

xref #8911 and #15204

@alexlenail
Copy link
Contributor Author

alexlenail commented Dec 30, 2017

@jreback Thanks for adding in the history. I'm sorry I didn't check myself before opening the issue.

Seaborn is quite good at visualizing heatmaps in the < 100 x 100 cells range. Starting around there, the code becomes prohibitively slow, usually crashing after a couple minutes of standstill.

I'm not sure how it would be possible to add a better heatmap function, but it's clearly possible since R has a function which doesn't even blink when given 1000 x 1000. This might be an intrinsic issue with matplotlib (suggesting we would need to circumvent it with some C) or it might not (in which case we would just need to write some optimized matplotlib code). I haven't looked into it deep enough.

@mroeschke
Copy link
Member

Thanks for the request, but since seaborn provides this functionality pretty easily and there hasn't been additional community or core dev interest over the years going to close for now. Can open if there's renewed interest from both parties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants