Add ggplot2 column chart examples from Sascha
* stacked
* grouped
Change-Id: I5e2a2afdbfbee5a514ce41fddbef7b2e49098ed7
diff --git a/Readme.md b/Readme.md
index fd146e6..b65da0c 100644
--- a/Readme.md
+++ b/Readme.md
@@ -80,6 +80,47 @@
```
![](./man/figures/Readme-Example-3.png)<!-- -->
+### Stacked bars with ggplot2 light and default colours saved as png
+```R
+subkategorien <- data.frame(Kategorie = rep(c("Ressource A", "Ressource B",
+ "Ressource C"), each = 3),
+ Subkategorie = rep(c("Sub1", "Sub2", "Sub3"), 3),
+ Wert = rnorm(n = 9, mean = 10000, sd = 2500))
+
+ggplot(subkategorien, aes(x = Kategorie, y = Wert, fill = Subkategorie)) +
+ geom_col() +
+ labs(x = "<x-Achsen-Beschriftung>",
+ y = "<y-Achsen-Beschriftung>",
+ title = "<Titel>",
+ subtitle = "<optionaler Untertitel>") +
+# theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
+ theme_ids() +
+ scale_fill_ids()
+ggsave("./man/figures/stacked_bars.png", p, width = 70 * .pt, height = 40 *.pt, units = "mm", dpi = 600)
+```
+![](./man/figures/stacked_bars.png)<!-- -->
+
+### Grouped bars with ggplot2 light and default colours saved as png
+```R
+subkategorien <- data.frame(Kategorie = rep(c("Ressource A", "Ressource B",
+ "Ressource C"), each = 3),
+ Subkategorie = rep(c("Sub1", "Sub2", "Sub3"), 3),
+ Wert = rnorm(n = 9, mean = 10000, sd = 2500))
+
+ggplot(subkategorien, aes(x = Kategorie, y = Wert, fill = Subkategorie)) +
+ geom_col(position = position_dodge()) +
+ labs(x = "<x-Achsen-Beschriftung>",
+ y = "<y-Achsen-Beschriftung>",
+ fill = "<Legendenbeschriftung>",
+ title = "<Titel>",
+ subtitle = "<optionaler Untertitel>") +
+# theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
+ theme_ids() +
+ scale_fill_ids()
+ggsave("./man/figures/grouped_bars.png", p, width = 70 * .pt, height = 40 *.pt, units = "mm", dpi = 600)
+```
+![](./man/figures/grouped_bars.png)<!-- -->
+
## Palettes
### Default: Adapted D3 based Palette
```R
diff --git a/man/figures/grouped_bars.png b/man/figures/grouped_bars.png
new file mode 100644
index 0000000..53db39c
--- /dev/null
+++ b/man/figures/grouped_bars.png
Binary files differ
diff --git a/man/figures/stacked_bars.png b/man/figures/stacked_bars.png
new file mode 100644
index 0000000..53db39c
--- /dev/null
+++ b/man/figures/stacked_bars.png
Binary files differ