Skip to content
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

Print Cell Labels in Heatmap #74

Open
ndellomoUber opened this issue Oct 18, 2016 · 5 comments
Open

Print Cell Labels in Heatmap #74

ndellomoUber opened this issue Oct 18, 2016 · 5 comments

Comments

@ndellomoUber
Copy link

Is it possible to add data labels in each cell of the heatmap? If not, is this something that can easily be built?

@boyiguo1
Copy link

I believe there is a parameter called "cellnote", where you can pass in the labels in the format of a matrix whose size matches the data matrix you put in d3heatmap. Then the label you desire will show in the hover. Is it what you want?

@JohnMCMa
Copy link

JohnMCMa commented Dec 8, 2016

I mean he means having the data printed directly on to the heatmap cell. cellnote just replaces the x value on mouseover.

@ebendutoit
Copy link

Is there a way to achieve this? Values written directly in the cells?

@talgalili
Copy link
Owner

I will try to add this to heatmaply in the future (I believe it shouldn't be too hard to do there, since it would simply mean adding a paramater that adds another ggplot2 text layer).
talgalili/heatmaply#42

Cheers,
Tal

@talgalili
Copy link
Owner

Hi @ndellomoUber

The heatmaply R package is a new implementation of interactive cluster heatmaps in R which relies on the plotly R package. This is based on a fork of my work in d3heatmap.

The package is availabale from CRAN:
https://cran.r-project.org/package=heatmaply

The feature you've requested is now available by using the following code:

library(heatmaply)
heatmaply(mtcars, draw_cellnote = TRUE)

(specifically you should get the github version since it has the most updated color interpolation for this)

image

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

No branches or pull requests

5 participants