#' Tecan functions
#'
#' This function set a default publishable figure title and text for ggplot2
#' @param g
#' @keywords
#' @export
#' @examples
#'
#'
themeSet.1 <- function(g) {
g <- g +
# hide background
theme_bw() +
theme(legend.background = element_rect(fill = "white")) +
# Hide all the vertical gridlines
theme(panel.grid.minor.x = element_blank(),
panel.grid.major.x = element_blank()) +
theme(panel.grid.minor.y = element_blank(),
panel.grid.major.y = element_blank()) +
# Change font options:
# X-axis label: bold, red, and 20 points
# X-axis tick marks: rotate 90 degrees CCW, move to the left a bit (using vjust,
# since the labels are rotated), and 16 points
# Facet Strip Font
theme(
axis.title.x = element_text(
face = "bold",
colour = "black",
size = 20
),
axis.text.x = element_text(
face = 'bold',
colour = '#000000',
vjust = 0.5,
size = 14
)
) +
theme(
axis.title.y = element_text(
face = "bold",
colour = "black",
size = 20
),
axis.text.y = element_text(
face = 'bold',
colour = '#000000',
angle = 90,
vjust = 0.5,
size = 14
)
) +
theme(strip.text.x = element_text(size = 14, colour = "black")) +
# Title appearance
theme(legend.title = element_text(
colour = "black",
size = 20,
face = "bold"
)) +
# Label appearance
theme(legend.text = element_text(
colour = "black",
size = 14,
face = "bold"
)) +
theme(legend.position = "right")
return(g)
}
#' Tecan functions
#'
#' This function set a default publishable figure title and text for ggplot2
#' @param g
#' @keywords
#' @export
#' @examples
#'
#'
themeSet.2 <- function(g) {
g <- g +
# hide background
# theme_bw() +
# theme(legend.background = element_rect(fill = "white")) +
# # Hide all the vertical gridlines
# theme(panel.grid.minor.x = element_blank(),
# panel.grid.major.x = element_blank()) +
# theme(panel.grid.minor.y = element_blank(),
# panel.grid.major.y = element_blank()) +
# Change font options:
# X-axis label: bold, red, and 20 points
# X-axis tick marks: rotate 90 degrees CCW, move to the left a bit (using vjust,
# since the labels are rotated), and 16 points
# Facet Strip Font
theme(
axis.title.x = element_text(
face = "bold",
colour = "black",
size = 20
),
axis.text.x = element_text(
face = 'bold',
colour = '#000000',
vjust = 0.5,
size = 14
)
) +
theme(
axis.title.y = element_text(
face = "bold",
colour = "black",
size = 20
),
axis.text.y = element_text(
face = 'bold',
colour = '#000000',
angle = 90,
vjust = 0.5,
size = 14
)
) +
theme(strip.text.x = element_text(size = 14, colour = "black")) +
# Title appearance
theme(legend.title = element_text(
colour = "black",
size = 20,
face = "bold"
)) +
# Label appearance
theme(legend.text = element_text(
colour = "black",
size = 14,
face = "bold"
)) +
theme(legend.position = "right")
return(g)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.