Type: | Package |
Title: | Colors for NEST Graphs |
Version: | 0.1.3 |
Date: | 2025-01-21 |
Description: | Clinical reporting figures require to use consistent colors and configurations. As a part of the Roche open-source clinical reporting project, namely the NEST project, the 'nestcolor' package specifies the color code and default theme with specifying 'ggplot2' theme parameters. Users can easily customize color and theme settings before using the reset of NEST packages to ensure consistent settings in both static and interactive output at the downstream. |
License: | Apache License 2.0 |
URL: | https://insightsengineering.github.io/nestcolor/, https://github.com/insightsengineering/nestcolor/ |
BugReports: | https://github.com/insightsengineering/nestcolor/issues |
Depends: | R (≥ 3.6) |
Imports: | checkmate (≥ 2.1.0), ggplot2 (≥ 3.5.0), lifecycle (≥ 1.0.3) |
Suggests: | knitr (≥ 1.42), rmarkdown (≥ 2.19), testthat (≥ 3.0.4) |
VignetteBuilder: | knitr, rmarkdown |
RdMacros: | lifecycle |
Config/Needs/verdepcheck: | mllg/checkmate, tidyverse/ggplot2, r-lib/lifecycle, yihui/knitr, rstudio/rmarkdown, r-lib/testthat |
Config/Needs/website: | insightsengineering/nesttemplate |
Encoding: | UTF-8 |
Language: | en-US |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-01-21 07:51:47 UTC; rstudio |
Author: | Joe Zhu |
Maintainer: | Joe Zhu <joe.zhu@roche.com> |
Repository: | CRAN |
Date/Publication: | 2025-01-21 09:40:02 UTC |
Color Palettes Used in NEST
Description
A standardized color palette to be used for all plots within the NEST project.
Usage
color_palette(n = 10, palette = "nest")
Arguments
n |
(
|
palette |
(
|
Value
A list of hex color code
Examples
library(grid)
plot_pal <- function(x) {
grid.newpage()
pushViewport(plotViewport(rep(1, 4)))
pushViewport(viewport(layout = grid.layout(1, ncol = length(x))))
for (i in seq_along(x)) {
grid.rect(
gp = gpar(fill = x[i], col = NA),
vp = viewport(layout.pos.col = i, layout.pos.row = 1)
)
}
}
plot_pal(color_palette(n = 10, palette = "nest"))
plot_pal(color_palette(n = 10, palette = "stream"))
plot_pal(color_palette(n = 10, palette = "viridis"))
plot_pal(color_palette(n = 10, palette = "accessible"))
Returns a custom NEST
ggplot2
theme
Description
Returns a custom NEST
ggplot2
theme
Usage
theme_nest(font_size = 10, ...)
Arguments
font_size |
( |
... |
( |
Value
Return ggplot theme
Examples
plot <- ggplot2::ggplot(iris, ggplot2::aes(x = Sepal.Length, y = Sepal.Width)) +
ggplot2::geom_point() +
theme_nest()