d3heatmap icon indicating copy to clipboard operation
d3heatmap copied to clipboard

Color key and density info legend

Open juferban opened this issue 9 years ago • 15 comments

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

juferban avatar Jan 30 '16 00:01 juferban

I would be interested in this functionality as well.

bextra avatar Mar 06 '16 20:03 bextra

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

pierduemila avatar Jul 13 '16 10:07 pierduemila

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

alanocallaghan avatar Aug 06 '16 22:08 alanocallaghan

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

talgalili avatar Aug 07 '16 05:08 talgalili

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.

juferban avatar Aug 20 '16 04:08 juferban

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

alanocallaghan avatar Aug 20 '16 11:08 alanocallaghan

@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?

bextra avatar Aug 22 '16 14:08 bextra

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

talgalili avatar Aug 22 '16 14:08 talgalili

@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.

bextra avatar Aug 22 '16 14:08 bextra

I understand - thanks for the explanation :)

talgalili avatar Aug 22 '16 14:08 talgalili

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

bextra avatar Aug 22 '16 14:08 bextra

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

alanocallaghan avatar Aug 22 '16 15:08 alanocallaghan

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

bextra avatar Aug 22 '16 15:08 bextra

If I find the time, absolutely

alanocallaghan avatar Aug 22 '16 16:08 alanocallaghan

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

juferban avatar Aug 22 '16 21:08 juferban