Update README with functions changes

This commit is contained in:
gnoblet 2022-12-21 10:42:34 -05:00
parent c55e293752
commit a4dd640439

View file

@ -83,11 +83,15 @@ df <- penguins |>
mean_fl = mean(flipper_length_mm, na.rm = T)) |> mean_fl = mean(flipper_length_mm, na.rm = T)) |>
ungroup() ungroup()
# Simple bar chart by group # Simple bar chart by group with some alpha transparency
bar_reach(df, mean_bl, island, species, percent = FALSE, x_title = "Mean of bill length") 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 ### 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} ```{r example-point-chart, eval = TRUE}
# Simple point chart # 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 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 # 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 ## Maps