From d8c972d69380c9381a16737b6ce77fe22611f41c Mon Sep 17 00:00:00 2001 From: JakeConway Date: Thu, 1 Dec 2016 10:08:20 -0500 Subject: [PATCH] set intersection size axis min to 0 for log scales --- R/MainBar.R | 3 ++- R/upset.R | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/R/MainBar.R b/R/MainBar.R index 1480fd4..36a8005 100644 --- a/R/MainBar.R +++ b/R/MainBar.R @@ -118,7 +118,8 @@ Make_main_bar <- function(Main_bar_data, Q, show_num, ratios, customQ, number_an } Main_bar_plot <- (ggplot(data = Main_bar_data, aes_string(x = "x", y = "freq")) - + scale_y_continuous(trans = scale_intersections, limits = c(NA, ymax)) + + scale_y_continuous(trans = scale_intersections) + + ylim(0, ymax) + geom_bar(stat = "identity", width = 0.6, fill = Main_bar_data$color) + scale_x_continuous(limits = c(0,(nrow(Main_bar_data)+1 )), expand = c(0,0), diff --git a/R/upset.R b/R/upset.R index ea519ff..2212308 100644 --- a/R/upset.R +++ b/R/upset.R @@ -250,8 +250,8 @@ upset <- function(data, nsets = 5, nintersects = 40, sets = NULL, keep.order = F if(is.null(ShadingData) == TRUE){ ShadingData <- MakeShading(Matrix_layout, shade.color) } - Main_bar <- Make_main_bar(All_Freqs, Bar_Q, show.numbers, mb.ratio, customQBar, number.angles, EBar_data, mainbar.y.label, - mainbar.y.max, scale.intersections, text.scale, attribute.plots) + Main_bar <- suppressMessages(Make_main_bar(All_Freqs, Bar_Q, show.numbers, mb.ratio, customQBar, number.angles, EBar_data, mainbar.y.label, + mainbar.y.max, scale.intersections, text.scale, attribute.plots)) Matrix <- Make_matrix_plot(Matrix_layout, Set_sizes, All_Freqs, point.size, line.size, text.scale, labels, ShadingData, shade.alpha) Sizes <- Make_size_plot(Set_sizes, sets.bar.color, mb.ratio, sets.x.label, scale.sets, text.scale, set_size.angles)