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

Mapping categorical values to dots in intersection matrix #190

Open
mwittep opened this issue Dec 4, 2023 · 1 comment
Open

Mapping categorical values to dots in intersection matrix #190

mwittep opened this issue Dec 4, 2023 · 1 comment
Labels
help-request User requested help with the package

Comments

@mwittep
Copy link

mwittep commented Dec 4, 2023

Objective

I would like to simplify this plot by encoding the classes 1 and 2 (see label) on the nodes themselves, for example using color, but still keep the different intersections. This means, an intersection with family_2, genus_2 and species_2 is not the same as family_2, genus_2 and species_1. Hence, it would have the similar "dot distribution", i.e. all three will be filled, but in the first intersection all will be one color, while in the second one all but the third will have the same color.

Any ideas? I have tried modifying the y scale of the intersection matrix, but this does not seem to work. Afterward, was planning to modify the scale_color_manual.

I know this might be difficult, since the input of the matrix changes from boolean to categorical (0,1,2).

Code

# Create the upset plot
upset_obj <- upset(
    data_mod, columns)

Screenshot or illustration
image

Context (required)

ComplexUpset version: 1.3.3

R version details
$platform
[1] "aarch64-apple-darwin20"

$arch
[1] "aarch64"

$os
[1] "darwin20"

$system
[1] "aarch64, darwin20"

$status
[1] ""

$major
[1] "4"

$minor
[1] "3.2"

$year
[1] "2023"

$month
[1] "10"

$day
[1] "31"

$`svn rev`
[1] "85441"

$language
[1] "R"

$version.string
[1] "R version 4.3.2 (2023-10-31)"

$nickname
[1] "Eye Holes"
R session information
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1.2

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Berlin
tzcode source: internal

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

other attached packages:
 [1] devtools_2.4.5     usethis_2.2.2      lubridate_1.9.3    forcats_1.0.0     
 [5] stringr_1.5.1      dplyr_1.1.4        purrr_1.0.2        readr_2.1.4       
 [9] tidyr_1.3.0        tibble_3.2.1       ggplot2_3.4.4      tidyverse_2.0.0   
[13] ComplexUpset_1.3.3

loaded via a namespace (and not attached):
 [1] gtable_0.3.4        htmlwidgets_1.6.3   remotes_2.4.2.1    
 [4] processx_3.8.2      callr_3.7.3         tzdb_0.4.0         
 [7] vctrs_0.6.5         tools_4.3.2         ps_1.7.5           
[10] generics_0.1.3      fansi_1.0.5         pkgconfig_2.0.3    
[13] lifecycle_1.0.4     compiler_4.3.2      farver_2.1.1       
[16] munsell_0.5.0       httpuv_1.6.12       htmltools_0.5.7    
[19] pillar_1.9.0        later_1.3.1         crayon_1.5.2       
[22] urlchecker_1.0.1    ellipsis_0.3.2      cachem_1.0.8       
[25] sessioninfo_1.2.2   mime_0.12           tidyselect_1.2.0   
[28] digest_0.6.33       stringi_1.8.2       labeling_0.4.3     
[31] fastmap_1.1.1       grid_4.3.2          colorspace_2.1-0   
[34] cli_3.6.1           magrittr_2.0.3      patchwork_1.1.3    
[37] ggplot2movies_0.0.1 pkgbuild_1.4.2      utf8_1.2.4         
[40] withr_2.5.2         prettyunits_1.2.0   scales_1.3.0       
[43] promises_1.2.1      timechange_0.2.0    hms_1.1.3          
[46] memoise_2.0.1       shiny_1.8.0         miniUI_0.1.1.1     
[49] profvis_0.3.8       rlang_1.1.2         Rcpp_1.0.11        
[52] xtable_1.8-4        glue_1.6.2          pkgload_1.3.3      
[55] jsonlite_1.8.7      R6_2.5.1            fs_1.6.3  
@mwittep mwittep added the help-request User requested help with the package label Dec 4, 2023
@mwittep
Copy link
Author

mwittep commented Dec 4, 2023

This would be final visualization.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-request User requested help with the package
Projects
None yet
Development

No branches or pull requests

1 participant