Skip to content

Commit

Permalink
theme_default
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 21, 2024
1 parent a369432 commit 5634b4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions R/tinyplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,9 @@ tinyplot.default = function(

palette = substitute(palette)

if (is.null(palette)) {
palette = get_tpar("palette", default = NULL)
}
# themes
if (is.null(palette)) palette = get_tpar("palette", default = NULL)
if (is.null(pch)) pch = get_tpar("pch", default = NULL)

xlabs = ylabs = NULL

Expand Down
7 changes: 3 additions & 4 deletions R/tinytheme.R
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,9 @@ tinytheme = function(theme = "default", ...) {
init_tpar(rm_hook = TRUE)

assert_choice(theme, c("default", sort(c("bw", "classic", "dark", "ipsum", "minimal"))))
# Empty call only resets the theme
if (isTRUE(theme == "default")) {
return(invisible(NULL))
}

settings = switch(theme,
"default" = theme_default,
"bw" = theme_bw,
"classic" = theme_classic,
"dark" = theme_dark,
Expand All @@ -69,6 +66,8 @@ tinytheme = function(theme = "default", ...) {
}


theme_default = list()

theme_bw = list(
tinytheme = "bw",
adj = 0.5,
Expand Down

0 comments on commit 5634b4d

Please sign in to comment.