Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions R/Boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
IntersectionBoxPlot <- function(data1, data2, start_col, names){
end_col <- ((start_col + length(names)) - 1)
data2 <- data2[which(rowSums(data2[ ,start_col:end_col]) != 0), ]
#tagging because x axis values need to be 1:number of sets so they line up with their intersections
data2$tag <- 1:nrow(data2)
sets <- list()
intersections <- list()
Expand Down Expand Up @@ -42,7 +41,7 @@ BoxPlotsPlot <- function(bdat, att, att_color){
bdat$x <- as.factor(bdat$x)
boxplots <- ggplotGrob(ggplot()
+ theme_bw() +ylab(yaxis)
+ scale_x_discrete(limits = plot_lims, expand = c(0,0))
+ scale_x_discrete(limits = factor(plot_lims), expand = c(0,0))
+ theme(plot.margin = unit(c(-0.7,0,0,0), "cm"),
axis.title.y = element_text(vjust = -0.8),
axis.ticks.x = element_blank(),
Expand All @@ -54,4 +53,4 @@ BoxPlotsPlot <- function(bdat, att, att_color){
+ geom_boxplot(data = bdat, aes_string(x="x", y="attribute"),
fill = att_color, colour = "gray80"))
return(boxplots)
}
}