# setwd("C:/Users/Wei-Ting/Dropbox/DataCoding/my_R/package/vennchart/rfiles") rm(list =ls()) co_A <- 10 co_B <- 12 co_C <- 3 co_AB <- 1.9 co_BC <- 0.5 co_AC <-1
# install.packages("devtools") library(devtools) install_github("vennchart", "weitingwlin") # install("~/Dropbox/DataCoding/my_R/package/vennchart") # install("C:/Users/Wei-Ting/Dropbox/DataCoding/my_R/package/vennchart") library(vennchart)
#source("sourceAll.R") Q <- vennChart(A_all = co_A, B_all = co_B, AandB = co_AB)
#source("sourceAll.R") Q <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC)
L<-Q$circles$limits
move the plot to the bottom
L2 <- list("xlim" = L$xlim, "ylim"= L$ylim +1.5) L2
Q <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC, lim = L2)
#source("sourceAll.R") Q <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC, colors = list(rgb(0.145, 0.51, 0.71, 0.4), rgb(1, 0.78, 0.16, 0.4), rgb(1, 0.32, 0.16, 0.4)), textadj = c(1, 0.2), cex = 1.5, frameadj = 1.1 )
# source("plotvenn.R") # source("plotvenntexts.R") # source("sourceAll.R") plotVenn(Q$circles, frameadj = 1.2) plotVennTexts(Q$textspos, unit = "%)", connect = ":\n(") title(main = "Title")
rm(list =ls()) co_A <- 10 co_B <- 12 co_C <- 3 co_AB <- 0 co_BC <- 0.5 co_AC <-1
Q <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC, frameadj = 1.2)
(so B = 12 in this graph will be the same size as in the previous graph)
co_A <- 3 co_AB <-0 co_BC <-0 R <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC, lim = Q$circles$limits, textadj = c(1.1,0))
co_A <- 1 co_AB <-1 co_BC <-0 R <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC, lim = Q$circles$limits, textadj = c(1.1,0)) R
co_A <- 5 S <- vennChart(A_all = co_A, B_all = co_B, C_all = co_C, AandB = co_AB, AandC = co_AC, BandC = co_BC, lim = list("xlim" = c(-5,5), "ylim" = c(-5, 5)), textadj = c(1.3,0.25), cex = 1.2, unit = "%)", connect = "\n(")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.