Skip to content

Commit 4a38026

Browse files
Update README
1 parent dfc944f commit 4a38026

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

README.Rmd

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ You can change the number of colors (10 shown below).
6161
nmfs_palette("oceans")(10)
6262
```
6363

64+
## Theme for `ggplot` objects
65+
66+
**New feature**: With the new `theme_nmfs()` function, you can add a NMFS-colored theme to your `ggplot` objects!
67+
This new theme that applies NMFS color palettes and theme-related elements (such as label sizes, borders, axis lines, and more) to a plot.
68+
69+
```{r}
70+
#| label: theme_example
71+
72+
library(ggplot2)
73+
ggplot(mtcars, aes(x = mpg, y = disp, color = as.factor(cyl))) +
74+
geom_point(size = 3) +
75+
nmfspalette::theme_nmfs(discrete = TRUE, interpolate = TRUE, palette = "crustacean")
76+
```
77+
6478
## Palettes
6579

6680
Use the `all_nmfs_palettes()` function to see all available palettes.
4.78 KB
Loading

0 commit comments

Comments
 (0)