Parse ggplot2_args
object into the ggplot2
expression
parse_ggplot2_args.Rd
Usage
parse_ggplot2_args(
ggplot2_args = teal.widgets::ggplot2_args(),
ggtheme = c("default", "gray", "bw", "linedraw", "light", "dark", "minimal", "classic",
"void", "test")
)
Arguments
- ggplot2_args
(
ggplot2_args
)
This argument could be a result of theresolve_ggplot2_args()
.- ggtheme
(
character(1)
)
name of theggplot2
theme to be applied, e.g."dark"
.
Examples
parse_ggplot2_args(
resolve_ggplot2_args(ggplot2_args(
lab = list(title = "TITLE"),
theme = list(title = ggplot2::element_text(size = 20))
))
)
#> $labs
#> ggplot2::labs(title = "TITLE")
#>
#> $theme
#> ggplot2::theme(title = list(family = NULL, face = NULL, colour = NULL,
#> size = 20, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
#> margin = NULL, debug = NULL, inherit.blank = FALSE))
#>
parse_ggplot2_args(
resolve_ggplot2_args(
ggplot2_args(
lab = list(title = "TITLE"),
theme = list(title = ggplot2::element_text(size = 20))
)
),
ggtheme = "gray"
)
#> $labs
#> ggplot2::labs(title = "TITLE")
#>
#> $ggtheme
#> ggplot2::theme_gray()
#>
#> $theme
#> ggplot2::theme(title = list(family = NULL, face = NULL, colour = NULL,
#> size = 20, hjust = NULL, vjust = NULL, angle = NULL, lineheight = NULL,
#> margin = NULL, debug = NULL, inherit.blank = FALSE))
#>