@@ -79,17 +79,17 @@ compose_grid(p1, p2, tag_levels = "A") |>
7979Every plotit chart follows a consistent pipeline:
8080
8181```
82- data |> plotit(encode(...)) |> mark_*() |> scale_*() |> label_ *() |> project_*() |> split_ *() |> style() |> export()
82+ data |> plotit(encode(...)) |> mark_*() |> scale_*() |> split_ *() |> project_*() |> label_ *() |> style() |> export()
8383```
8484
8585| Step | Verb | Role |
8686| :---| :---| :---|
8787| 1. Initialise | ` plotit() ` + ` encode() ` | Bind data and aesthetic mappings |
8888| 2. Layer | ` mark_*() ` | Add geometric layers (points, lines, bars, …) |
8989| 3. Scale | ` scale_*() ` | Control how data maps to visual properties |
90- | 4. Label | ` label_ *()` | Set titles, axis labels, legend titles |
90+ | 4. Facet | ` split_ *()` | Split into small multiples |
9191| 5. Coordinate | ` project_*() ` | Choose coordinate system (cartesian, polar, map) |
92- | 6. Facet | ` split_ *()` | Split into small multiples |
92+ | 6. Label | ` label_ *()` | Set titles, axis labels, legend titles |
9393| 7. Theme | ` style() ` | Apply a complete theme |
9494| 8. Export | ` export() ` | Render to file |
9595
@@ -107,10 +107,14 @@ compose_*(p1, p2, ...) |> label_*() |> style() |> export()
107107| :---| :---| :---|
108108| ` mark_point() ` | ` geom_point() ` | Scatter plots |
109109| ` mark_line() ` | ` geom_line() ` | Lines and trends |
110+ | ` mark_area() ` | ` geom_area() ` | Filled area / stream graph |
110111| ` mark_bar() ` | ` geom_bar() ` / ` geom_col() ` | Bar charts |
112+ | ` mark_text() ` | ` geom_text() ` / ` ggrepel ` | Text labels and annotations |
111113| ` mark_boxplot() ` | ` geom_boxplot() ` | Box-and-whisker plots |
112114| ` mark_histogram() ` | ` geom_histogram() ` | Histograms |
113- | ` mark_density() ` | ` geom_density() ` | Kernel density estimates |
115+ | ` mark_density() ` | ` geom_density() ` | 1D kernel density |
116+ | ` mark_violin() ` | ` geom_violin() ` | Violin plots |
117+ | ` mark_map() ` | ` geom_sf() ` | Geographic maps |
114118
115119### ` scale_* ` — Data-to-visual mapping
116120
@@ -167,6 +171,13 @@ compose_*(p1, p2, ...) |> label_*() |> style() |> export()
167171| ` style_default() ` | Restore plotit's built-in theme |
168172| ` export() ` | Render to file (pdf, png, svg, …) |
169173
174+ ### Custom extensions
175+
176+ | Function | Description |
177+ | :---| :---|
178+ | ` make_mark() ` | Register a custom mark from any ggplot2 geom |
179+ | ` make_theme() ` | Create a reusable theme preset function |
180+
170181## Documentation
171182
172183Full documentation is available at [ zorrooz.github.io/plotit] ( https://zorrooz.github.io/plotit/ ) .
0 commit comments