Working with Layouts and Composition
13:30-15:00
View slides in full screen | Run the code yourself
Outline
- Legend Placement and Styling
- Discrete Legend
- Continuous Legend
- Legend Position
- Legend Justification
- Legend Direction
- Legend Types
- Legend Styling
- Key Glyphs
- Composing ggplot’s
- The “Monsters” Example
- {patchwork}
- Apply Theming
- Adjust Widths and Heights
- Use a Custom Layout
- Add Labels
- Add Text
- Add Inset Plots
- More Legend Styling
- Legend with Color Shading
- Legend on Top
- Resort Legend
Recap
- guides are the combination of scales and legends
- legends can be either modified with the
guide_*
function inscale_*()
orguides()
and with thetheme()
component qualitative - … while quantitative guides are
colorbar
,colorsteps
orbins
{patchwork}
is the most modern and simplest way to compose plots- use
+
,/
and|
to combine plots - use
plot_layout()
to adjust the layout, widths and heights - use
plot_annotation()
to add tags and general labels - use
inset_element()
to add inset graphics
- use