talgalili / d3heatmap

A D3.js-based heatmap htmlwidget for R
Other
236 stars 93 forks source link

Color key and density info legend #50

Open juferban opened 8 years ago

juferban commented 8 years ago

Hi, Great job with the d3heatmap library. I really like it. Is there any plan to add a color key and density info legend box similar to the one in the picture? In heatmap2 it is generated using density.info and it is very useful to better understand the data in being plotted.

colorkeyhist

Thanks a lot,

Julio

bextra commented 8 years ago

I would be interested in this functionality as well.

pierduemila commented 8 years ago

Likewise, key=TRUE does't seem to work.

alanocallaghan commented 8 years ago

This repository doesn't seem to be particularly active at the moment. I have implemented a primitive version of this in my fork. I'll try to polish it over time

https://github.com/Alanocallaghan/d3heatmap

talgalili commented 8 years ago

Hello @Alanocallaghan and everyone. As you have noticed, Joe seems to be busy with other projects. I have currently moved my efforts to the new heatmaply package: https://github.com/talgalili/heatmaply It is focused on combining ggplot2 with plotly to produce cluster heatmaps, and is currently offering more options than d3heatmap. It also comes with a color key legend built in. I was not yet able to implement density info (this would require more work on plotly::subplot by the people working on it). The package is still young, so if anyone has feature or pull requests - I will be happy to address them.

With regards, Tal

juferban commented 8 years ago

Hello @Alanocallaghan,

Could you provide some example on how to generate the color key with your code? I check your repository and even though I can see the jsfiddle example with the color key on it I was not able to figure out what is the parameter to add into d3heatmap.

Thanks a lot.

alanocallaghan commented 8 years ago

Hi @juferban, Thanks for the heads up. I had it set as the default (I think not using a colour key is rather silly). I've now updated it to use the logical parameter show_color_legend. I've also tweaked the CSS, updated the documentation and fixed a minor bug so I would recommend installing the latest version.

Cheers, Alan

bextra commented 8 years ago

@Alanocallaghan i was just getting ready to do the update but saw that the most recent commit on this git repo was a couple months ago. Should we be installing from here or the CRAN directly?

talgalili commented 8 years ago

Hi @kbeck527 - I was wondering, is there currently a reason to prefer d3heatmap over heatmaply?

bextra commented 8 years ago

@talgalili Just trying to make sure legacy code is the best it can be. We are migrating to heatmaply but it isn't implemented for all of our visualizations yet.

talgalili commented 8 years ago

I understand - thanks for the explanation :)

bextra commented 8 years ago

Update: @Alanocallaghan the CRAN version is 0.6.1.1 and dated February. So where would this update be?

alanocallaghan commented 8 years ago

Hi @kbeck527, I was referring to the recent commits on my branch (https://github.com/Alanocallaghan/d3heatmap). You can find instructions on there for installing that particular branch and version. I'm not a contributor to this particular repository as it doesn't seem to be active at the moment

bextra commented 8 years ago

Ah I see. Thank you @Alanocallaghan. Very helpful changes. Are you planning to do a pull request in case it does become active again?

alanocallaghan commented 8 years ago

If I find the time, absolutely

juferban commented 8 years ago

Hi Alan @Alanocallaghan

Thanks a lot for the information and the update. I agree that there may be no reason to not have the color legend enabled but my first try on the code was not showing the legend so I thought I was missing something. Instead of the legend I still get what it looks like a couple of letters showing on the top-left corner. I am reviewing my code to see if there may be something interfering with your library and will let you know of any issues I may encounter. Once again thanks a lot for your help and for sharing your code.

Julio