From a4dd64043941be727c3305d626995362f2fe2e1c Mon Sep 17 00:00:00 2001 From: gnoblet Date: Wed, 21 Dec 2022 10:42:34 -0500 Subject: [PATCH] Update README with functions changes --- README.Rmd | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/README.Rmd b/README.Rmd index ae39c52..5e0b2bc 100644 --- a/README.Rmd +++ b/README.Rmd @@ -83,11 +83,15 @@ df <- penguins |> mean_fl = mean(flipper_length_mm, na.rm = T)) |> ungroup() -# Simple bar chart by group -bar_reach(df, mean_bl, island, species, percent = FALSE, x_title = "Mean of bill length") +# Simple bar chart by group with some alpha transparency +bar(df, island, mean_bl, species, percent = FALSE, alpha = 0.6, x_title = "Mean of bill length") + +# Using another color palette through `theme_reach()` and changing scale to percent +bar(df, island,mean_bl, species, percent = TRUE, theme = theme_reach(palette = "artichoke_3")) + +# Not flipped, with text added, group_title, no y-axis and no bold for legend +bar(df, island, mean_bl, species, group_title = "Species", flip = FALSE, add_text = TRUE, add_text_suffix = "%", percent = FALSE, theme = theme_reach(text_font_face = "plain", axis_y = FALSE)) -# Using another color palette -bar_reach(df, mean_bl, island, species, percent = FALSE, palette = "artichoke_3", legend_rev = TRUE) ``` ### Example 2: Point chart, already REACH themed @@ -97,13 +101,13 @@ At this stage, `point_reach()` only supports categorical grouping colors with th ```{r example-point-chart, eval = TRUE} # Simple point chart -point_reach(penguins, bill_length_mm, flipper_length_mm) +point(penguins, bill_length_mm, flipper_length_mm) # Point chart with grouping colors, greater dot size, some transparency, reversed color palette -point_reach(penguins, bill_length_mm, flipper_length_mm, island, alpha = 0.6, size = 3, reverse = TRUE) +point(penguins, bill_length_mm, flipper_length_mm, island, alpha = 0.6, size = 3, theme = theme_reach(reverse = TRUE)) # Using another color palettes -point_reach(penguins, bill_length_mm, flipper_length_mm, island, palette = "artichoke_3") +point(penguins, bill_length_mm, flipper_length_mm, island, size = 1.5, x_title = "Bill", y_title = "Flipper", title = "Length (mm)", theme = theme_reach(palette = "artichoke_3", text_font_face = , grid_x = T)) ``` ## Maps