Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Jan 30, 2025
1 parent a41f95e commit 6e76028
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
5 changes: 2 additions & 3 deletions R/theme_abyss.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ theme_abyss <- function(base_size = 11,
plot.background = element_rect(fill = "#001429"),
panel.background = element_rect(fill = "#001429"),
legend.background = element_rect(fill = "#001429"),
axis.line = element_line(color = "#f2f2f2"),
axis.line = element_line(color = "#f2f2f2", linewidth = base_size / 22),
rect = element_rect(colour = "#f2f2f2", linewidth = base_size / 22),
text = element_text(color = "#f2f2f2"),
axis.text = element_text(color = "#f2f2f2"),
panel.grid.major = element_line(color = "#465463"),
strip.text = element_text(color = "#f2f2f2"),
base_line_size = base_size / 22, # ggplot2 defaults
base_rect_size = base_size / 22,
...
)
}
5 changes: 2 additions & 3 deletions R/theme_blackboard.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ theme_blackboard <- function(base_size = 11,
plot.background = element_rect(fill = "#0d0d0d"),
panel.background = element_rect(fill = "#0d0d0d"),
legend.background = element_rect(fill = "#0d0d0d"),
axis.line = element_line(color = "#E0E0E0"),
axis.line = element_line(color = "#E0E0E0", linewidth = base_size / 22),
rect = element_rect(colour = "#E0E0E0", linewidth = base_size / 22),
text = element_text(color = "#E0E0E0"),
axis.text = element_text(color = "#E0E0E0"),
strip.text = element_text(color = "#E0E0E0"),
base_line_size = base_size / 22, # ggplot2 defaults
base_rect_size = base_size / 22,
...
)
}
7 changes: 3 additions & 4 deletions R/theme_lucid.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ theme_lucid <- function(base_size = 11,
tags.face = tags.face
) +
theme(
axis.line.x = element_line(colour = "grey80"),
axis.line.y = element_line(colour = "grey80"),
axis.line.x = element_line(colour = "grey80", linewidth = base_size / 22),
axis.line.y = element_line(colour = "grey80", linewidth = base_size / 22),
rect = element_rect(colour = "#grey80", linewidth = base_size / 22),
axis.text = element_text(colour = "grey50"),
axis.title = element_text(colour = "grey30"),
strip.background = element_rect(colour = "grey70", fill = "grey90"),
Expand All @@ -59,8 +60,6 @@ theme_lucid <- function(base_size = 11,
legend.text = element_text(colour = "grey30"),
panel.grid.major = element_line(colour = "grey90"),
panel.grid.minor = element_line(colour = "grey92"),
base_line_size = base_size / 22, # ggplot2 defaults
base_rect_size = base_size / 22,
...
)
}
24 changes: 10 additions & 14 deletions R/theme_modern.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,19 @@ theme_modern <- function(base_size = 11,
...) {
# Remove legend title if necessary
if (is.null(plot.title.size)) {
plot.title.size <-
element_text(
size = plot.title.size,
face = plot.title.face,
margin = margin(0, 0, plot.title.space, 0)
)
plot.title.size <-element_text(

Check warning on line 60 in R/theme_modern.R

View workflow job for this annotation

GitHub Actions / lint-changed-files / lint-changed-files

file=R/theme_modern.R,line=60,col=21,[infix_spaces_linter] Put spaces around all infix operators.
size = plot.title.size,
face = plot.title.face,
margin = margin(0, 0, plot.title.space, 0)
)
} else if (plot.title.size == "none") {
plot.title.size <- element_blank()
} else {
plot.title.size <-
element_text(
size = plot.title.size,
face = plot.title.face,
margin = margin(0, 0, plot.title.space, 0)
)
plot.title.size <- element_text(
size = plot.title.size,
face = plot.title.face,
margin = margin(0, 0, plot.title.space, 0)
)
}

# Remove legend title if necessary
Expand Down Expand Up @@ -126,8 +124,6 @@ theme_modern <- function(base_size = 11,
plot.tag = element_text(size = tags.size, face = tags.face),
strip.background = element_blank(),
strip.text = element_text(face = "bold"),
base_line_size = base_size / 22, # ggplot2 defaults
base_rect_size = base_size / 22,
...
)
}

0 comments on commit 6e76028

Please sign in to comment.