From 0768c0efb09d39fa650a7cf75764590b6d8ee5aa Mon Sep 17 00:00:00 2001 From: antaldaniel Date: Thu, 13 Oct 2022 09:07:09 +0200 Subject: [PATCH] README update --- README.Rmd | 26 ++++++++++++++++++++++++++ README.md | 26 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/README.Rmd b/README.Rmd index 5bbb137..5186d26 100644 --- a/README.Rmd +++ b/README.Rmd @@ -43,6 +43,32 @@ library(reprextemplates) add_greys( pal = reprex_palette(), c(40,60,80)) ``` + +```{r templateexample, message=FALSE} +library(dplyr) +library(ggplot2) +library(reprextemplates) + +data.frame ( + Color = names(reprex_palette()), + HEX = as.character(reprex_palette()), + values = rep(1,12) + ) %>% + ggplot( aes (x = Color, + y = values, + fill = Color)) + + geom_col() + + scale_fill_manual( values = reprex_palette()) + + theme_minimal() + + labs ( y = NULL, x = NULL, title = "Reprex & Observatory Color Palette") + + theme(axis.text.x=element_blank(), + axis.ticks.x=element_blank(), + axis.text.y=element_blank(), + axis.ticks.y=element_blank(), + panel.grid.major = element_blank()) + +``` + ## Code of Conduct Please note that the reprextemplates project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. diff --git a/README.md b/README.md index 06bd2ae..59dce5c 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,32 @@ add_greys( pal = reprex_palette(), c(40,60,80)) #> "#CCCCCC" ``` +``` r +library(dplyr) +library(ggplot2) +library(reprextemplates) + +data.frame ( + Color = names(reprex_palette()), + HEX = as.character(reprex_palette()), + values = rep(1,12) + ) %>% + ggplot( aes (x = Color, + y = values, + fill = Color)) + + geom_col() + + scale_fill_manual( values = reprex_palette()) + + theme_minimal() + + labs ( y = NULL, x = NULL, title = "Reprex & Observatory Color Palette") + + theme(axis.text.x=element_blank(), + axis.ticks.x=element_blank(), + axis.text.y=element_blank(), + axis.ticks.y=element_blank(), + panel.grid.major = element_blank()) +``` + + + ## Code of Conduct Please note that the reprextemplates project is released with a