Skip to content

Commit

Permalink
X_text,Y_text added
Browse files Browse the repository at this point in the history
  • Loading branch information
CHKim5 committed Aug 24, 2021
1 parent 1aa0bd6 commit 1a3ca57
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 21 deletions.
22 changes: 13 additions & 9 deletions R/AS_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#' @param width box width
#' @param fig_width figure size
#' @param fig_height figure size
#' @param Y_text Y axis title size
#' @param X_text X axis text size
#'
#' @return ggboxplot
#' @export
Expand All @@ -30,7 +32,9 @@ AS_boxplot<-function(data,
step_increase = 0.05,
width = 0.3,
fig_width = NA,
fig_height = NA){
fig_height = NA,
X_text = 10,
Y_text = 12){
{#Summary
###Plot_data_prep###
ifelse(!dir.exists(file.path(getwd(), "boxplot")), dir.create(file.path(getwd(), "boxplot")), FALSE)
Expand Down Expand Up @@ -124,8 +128,8 @@ AS_boxplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)+
Expand Down Expand Up @@ -162,8 +166,8 @@ AS_boxplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)
Expand Down Expand Up @@ -241,8 +245,8 @@ AS_boxplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position,
Expand Down Expand Up @@ -275,8 +279,8 @@ AS_boxplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)
Expand Down
22 changes: 13 additions & 9 deletions R/AS_dotplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#' @param size dot size
#' @param fig_width figure size
#' @param fig_height figure size
#' @param Y_text Y axis title size
#' @param X_text X axis text size
#'
#' @return ggdotplot
#' @export
Expand All @@ -30,7 +32,9 @@ AS_dotplot<-function(data,
step_increase = 0.05,
size = NULL,
fig_width = NA,
fig_height = NA){
fig_height = NA,
X_text = 10,
Y_text = 12){
{#Summary
###Plot_data_prep###
ifelse(!dir.exists(file.path(getwd(), "dotplot")), dir.create(file.path(getwd(), "dotplot")), FALSE)
Expand Down Expand Up @@ -125,8 +129,8 @@ AS_dotplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)+
Expand Down Expand Up @@ -164,8 +168,8 @@ AS_dotplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)
Expand Down Expand Up @@ -243,8 +247,8 @@ AS_dotplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)+
Expand Down Expand Up @@ -282,8 +286,8 @@ AS_dotplot<-function(data,
plot.caption=ggplot2::element_text(size=15), # caption
axis.title.x=ggplot2::element_text(vjust=10,
size=15), # X axis title
axis.title.y=ggplot2::element_text(size=12), # Y axis title
axis.text.x=ggplot2::element_text(size=10,
axis.title.y=ggplot2::element_text(size=Y_text), # Y axis title
axis.text.x=ggplot2::element_text(size=X_text,
vjust=.5), # X axis text
axis.text.y=ggplot2::element_text(size=10),
legend.position = legend_position)
Expand Down
8 changes: 7 additions & 1 deletion man/AS_barplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion man/AS_boxplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion man/AS_dotplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a3ca57

Please sign in to comment.