Update README with functions changes
This commit is contained in:
parent
c55e293752
commit
a4dd640439
1 changed files with 11 additions and 7 deletions
18
README.Rmd
18
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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue