Skip to content

Allow heatmaps to understand line objects #898

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
cpsievert opened this issue Sep 2, 2016 · 10 comments
Closed

Allow heatmaps to understand line objects #898

cpsievert opened this issue Sep 2, 2016 · 10 comments
Labels
feature something new

Comments

@cpsievert
Copy link

This could be used to effectively set the stroke of heatmap cells. Without it, I can't replicate this ggplot2 example -- plotly/plotly.R#699

@cpsievert cpsievert added the feature something new label Sep 2, 2016
@talgalili
Copy link

BUMP.
I hope this could be resolved so that heatmaps would include the option to show cells grid.

Thanks.

@rreusser
Copy link
Contributor

rreusser commented Apr 9, 2017

@talgalili xgap and ygap from #868 are not an exact match to this feature, but they do accomplish padding for the cells, which may be of some help.

@talgalili
Copy link

Thanks @rreusser .
@cpsievert - could this help solve this: plotly/plotly.R#699
what do you think?

@cpsievert
Copy link
Author

@talgalili no, xgap/ygap seem to specify a constant gap between each cell.

Also, for ggplot2 parity, we need each cell border to respect linetype. Just adding lty = 4 to your example yields:

screen shot 2017-04-09 at 11 43 23 am

@talgalili
Copy link

Hi @rreusser
Since my personal need for this is the ability to have a "grid like" look for the heatmaply R package, then actually "a constant gap between each cell" (defined on top of a ggplotly object derived from geom_tile), would be great. However, I'm not sure how to map that to the existing Aesthetics of geom_tile...

@cpsievert
Copy link
Author

@talgalili use style() to modify the attributes of existing traces:

style(p, xgap = 5)

@talgalili
Copy link

Thanks @cpsievert , this is very helpful! It would still be nice to have this issue resolved directly. But for now, this resolved the main feature I was looking for (i.e.: to add a grid of lines to heatmaply - talgalili/heatmaply@0f9f73b).

@cpsievert cpsievert added this to the ggplotly parity milestone May 10, 2017
@adriwitek
Copy link

I need to make a grid over a annotated heat map and this is very frustrating

@gvwilson
Copy link
Contributor

gvwilson commented Jun 5, 2024

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson

@gvwilson gvwilson closed this as completed Jun 5, 2024
@rabyj
Copy link

rabyj commented Apr 28, 2025

I think this is still pertinent. This isn't the first time I try to add grid lines in-between cells, without success. I didn't find any other issue related to this, but I might have missed it (I'm working from the Python side, but I imagine it would have to be implemented here first).

Currently, the grid lines from axes are centered on the cells, instead of at their edges.

I'm trying to reproduce something like this, and parameters xgap /ygap + plot_bgcolor are not enough, since I have nans that share the background color.

Should a new issue be opened?

Image

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

No branches or pull requests

6 participants