Closed stefanucci-luca closed 5 years ago
Hello,
I've been trying to use geom_density_ridges() function but when I use the functions quantile_lines() and jittered_points() I get:
Warning: Ignoring unknown parameters: quantile_lines, jittered_points
I don't know if I have ant problems in package's versions creating conflicts or I am setting something wrong.
Here the data I am using, the plot I am trying to make and SessionInfo()
df_var <- structure(list(Promoter.id1 = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), Distance_bait_prey = c(120536, 118081, 109646, 105159, 97202, 71739, 43239, 42450, 41350, 35391, 30686, 22941, 2584, 1873, 4264, 10040, 10794, 18074, 32473, 44556, 292007, 390016, 0, 0, 142512, 131396, 110989, 109562, 104713, 95261, 86678, 69790, 55695, 35697, 2889, 3958, 38661, 43660, 44783, 49321, 54148, 99101, 99977, 119272, 1484139, 409111, 386732, 123910, 118993, 115927, 113762, 79247, 66060, 49530, 40555, 37697, 30777, 9457, 22946, 36503, 67066, 77248, 205036, 317144, 0, 0, 685454, 118907, 111509, 82273, 40797, 31511, 2699, 3438, 9215, 17249, 0, 0, 213732, 94776, 0, 86753, 69263, 67025, 66564, 54178, 51116, 50332, 43140, 41183, 40896, 34972, 24871, 23565, 10131, 7517, 24279, 29130, 30790, 33482), node.class2 = c("Intron", "Intron", "Intron", "Intron", "Intron", "intergenic_region", "Promoter_flanking_region", "Promoter_flanking_region", "Exons", "Exons", "Exons", "intergenic_region", "Promoter_flanking_region", "Promoter_flanking_region", "Exons", "Promoter", "Promoter", "Promoter", "intergenic_region", "Intron", "intergenic_region", "Intron", "Intron", "Intron", "Exons", "Intron", "CTCF", "Intron", "Intron", "Intron", "Gene_name", "intergenic_region", "intergenic_region", "Exons", "Promoter_flanking_region", "Exons", "Promoter_flanking_region", "Promoter_flanking_region", "Intron", "Intron", "Exons", "Exons", "Intron", "intergenic_region", "Intron", "Enhancer", "Promoter", "Intron", "Intron", "Intron", "Intron", "Promoter", "Promoter_flanking_region", "Promoter_flanking_region", "Exons", "Exons", "Intron", "Promoter", "intergenic_region", "Exons", "Intron", "Exons", "CTCF", "Exons", "intergenic_region", "Exons", "Intron", "Intron", "CTCF", "Gene_name", "Exons", "Exons", "Promoter_flanking_region", "Exons", "Promoter", "Promoter", "Exons", "intergenic_region", "CTCF", "Promoter", "Intron", "CTCF", "Promoter", "Promoter", "Promoter", "CTCF", "CTCF", "CTCF", "Promoter_flanking_region", "Promoter", "Promoter", "Promoter", "CTCF", "CTCF", "Promoter_flanking_region", "Promoter", "CTCF", "Promoter", "Promoter", "Promoter")), row.names = c(NA, 100L), class = "data.frame") ggplot(df_var, aes(x = log10(Distance_bait_prey), y = node.class2, fill = node.class2, height = ..density..), alpha = 0.7) + geom_density_ridges(scale = 4, stat = "density", alpha = 0.9, panel_scaling = TRUE, quantile_lines = TRUE, jittered_points = TRUE) + scale_x_continuous(limits = c(2,7), name = "Distance Bait-prey [log10(bp)]", breaks = seq(2, 7, by = 1)) + labs(title = str_sub(name1, 1,-5), fill = "Distances grouped by Feature") + guides(fill = guide_legend(reverse = TRUE)) + theme_classic() + theme(plot.title = element_text(size = 54), axis.text.x = element_text(angle = 0, size = 16), axis.text.y = element_blank(), axis.title.y = element_blank(), axis.title.x = element_text(size = 0), axis.ticks.y = element_blank(), legend.title = element_text(size = 30), legend.text = element_text(size = 22), legend.position = "bottom" , legend.key.size = unit(1, "cm"), panel.grid.major = element_line(colour = "grey90", linetype = "solid", size = 0.3)) > sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.14.6 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] ggplotify_0.0.3 ggridges_0.5.1 ComplexHeatmap_1.20.0 gridExtra_2.3 gtable_0.3.0 ggraph_1.0.2 [7] igraph_1.2.4.1 multipanelfigure_2.0.2 magrittr_1.5 UpSetR_1.4.0 scales_1.0.0 cowplot_0.9.4 [13] RColorBrewer_1.1-2 pheatmap_1.0.12 plotly_4.9.0 forcats_0.4.0 stringr_1.4.0 dplyr_0.8.0.1 [19] purrr_0.3.2 readr_1.3.1 tidyr_0.8.3 tibble_2.1.1 ggplot2_3.2.1 tidyverse_1.2.1 loaded via a namespace (and not attached): [1] viridis_0.5.1 httr_1.4.0 jsonlite_1.6 viridisLite_0.3.0 modelr_0.1.4 [6] assertthat_0.2.1 rvcheck_0.1.3 cellranger_1.1.0 yaml_2.2.0 ggrepel_0.8.1 [11] pillar_1.4.0 backports_1.1.4 lattice_0.20-38 glue_1.3.1 digest_0.6.18 [16] assertive.types_0.0-3 polyclip_1.10-0 rvest_0.3.3 colorspace_1.4-1 htmltools_0.3.6 [21] plyr_1.8.4 pkgconfig_2.0.2 GetoptLong_0.1.7 broom_0.5.2 assertive.properties_0.0-4 [26] haven_2.1.0 magick_2.0 tweenr_1.0.1 ggforce_0.2.2 generics_0.0.2 [31] farver_1.1.0 withr_2.1.2 lazyeval_0.2.2 cli_1.1.0 crayon_1.3.4 [36] readxl_1.3.1 assertive.numbers_0.0-2 nlme_3.1-139 MASS_7.3-51.4 xml2_1.2.0 [41] tools_3.5.1 data.table_1.12.2 hms_0.4.2 GlobalOptions_0.1.0 assertive.files_0.0-2 [46] munsell_0.5.0 compiler_3.5.1 gridGraphics_0.4-1 rlang_0.3.4 rstudioapi_0.10 [51] circlize_0.4.6 rjson_0.2.20 htmlwidgets_1.3 assertive.base_0.0-7 labeling_0.3 [56] codetools_0.2-16 R6_2.4.0 lubridate_1.7.4 shape_1.4.4 stringi_1.4.3 [61] Rcpp_1.0.1 tidyselect_0.2.5
These are parameters of stat_density_ridges() but you're using stat_density().
stat_density_ridges()
stat_density()
Hello,
I've been trying to use geom_density_ridges() function but when I use the functions quantile_lines() and jittered_points() I get:
Warning: Ignoring unknown parameters: quantile_lines, jittered_points
I don't know if I have ant problems in package's versions creating conflicts or I am setting something wrong.
Here the data I am using, the plot I am trying to make and SessionInfo()