talgalili / heatmaply

Interactive Heat Maps for R Using plotly
380 stars 73 forks source link

overlapping legend for plot_method="plotly" with row_dend_left = T #49

Closed talgalili closed 7 years ago

talgalili commented 7 years ago

Example:

library(heatmaply)
heatmaply(mtcars, row_dend_left = T, 
          plot_method="plotly")

image

talgalili commented 7 years ago

With the latest version of ggplot2 and plotly this is still an issue, but the legend appears in a different location:

image

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Hebrew_Israel.1255  LC_CTYPE=Hebrew_Israel.1255   
[3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C                  
[5] LC_TIME=Hebrew_Israel.1255    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] heatmaply_0.9.0    viridis_0.3.4      plotly_4.5.6.9000  ggplot2_2.2.1.9000

loaded via a namespace (and not attached):
 [1] mclust_5.2.3       Rcpp_0.12.10       mvtnorm_1.0-6      lattice_0.20-33   
 [5] tidyr_0.6.1        class_7.3-14       gtools_3.5.0       assertthat_0.1    
 [9] digest_0.6.12      foreach_1.4.3      mime_0.5           R6_2.2.0          
[13] plyr_1.8.4         stats4_3.3.0       httr_1.2.1         gplots_3.0.1      
[17] lazyeval_0.2.0     diptest_0.75-7     curl_2.4           gdata_2.17.0      
[21] whisker_0.3-2      kernlab_0.9-25     labeling_0.3       devtools_1.11.1   
[25] stringr_1.2.0      htmlwidgets_0.8    munsell_0.4.3      shiny_1.0.1       
[29] httpuv_1.3.3       base64enc_0.1-3    htmltools_0.3.5    nnet_7.3-12       
[33] tibble_1.3.0       gridExtra_2.2.1    seriation_1.2-1    codetools_0.2-14  
[37] dendextend_1.5.0   viridisLite_0.2.0  dplyr_0.5.0        withr_1.0.2       
[41] MASS_7.3-45        bitops_1.0-6       grid_3.3.0         xtable_1.8-2      
[45] jsonlite_1.3       gtable_0.2.0       registry_0.3       DBI_0.6-1         
[49] git2r_0.15.0       magrittr_1.5       scales_0.4.1       KernSmooth_2.23-15
[53] stringi_1.1.5      reshape2_1.4.2     flexmix_2.3-13     robustbase_0.92-7 
[57] RColorBrewer_1.1-2 iterators_1.0.8    tools_3.3.0        Cairo_1.5-9       
[61] fpc_2.1-10         trimcluster_0.1-2  DEoptimR_1.0-8     purrr_0.2.2       
[65] gclus_1.3.1        crosstalk_1.0.0    yaml_2.1.14        colorspace_1.3-2  
[69] cluster_2.0.4      caTools_1.17.1     prabclus_2.2-6     TSP_1.1-5         
[73] memoise_1.0.0      knitr_1.15.1       modeltools_0.2-21 
alanocallaghan commented 7 years ago

Partial fix on new branch, issue remains with colorbar length

talgalili commented 7 years ago

The latest version seem to solve it:

image

And also

library(heatmaply)
heatmaply(iris, row_dend_left = T, 
          plot_method="plotly")

image

Thanks.

talgalili commented 7 years ago

Although I do wonder if in the case of

library(heatmaply)
heatmaply(iris, row_dend_left = T, 
          plot_method="plotly")

The current solution is the best one...