This geom owns both the bar outline and the hatch fill, so the shading lines follow the same rough outline rather than the underlying true rectangle.
Usage
geom_mypaint_col(
mapping = NULL,
data = NULL,
position = "stack",
...,
just = 0.5,
lineend = "butt",
linejoin = "mitre",
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
fill_pattern = NULL,
brush = NULL,
fill_brush = NULL,
hand = NULL,
stroke_hand = hand,
fill_hand = hand,
auto_solid_bg = NULL
)Arguments
- mapping, data, position, just, lineend, linejoin, na.rm, show.legend, inherit.aes
As for
ggplot2::geom_col().- ...
Other arguments passed to
ggplot2::layer().- fill_pattern
Optional fill pattern created with
hatch(),crosshatch(),zigzag(), orjumble().- brush
Stroke brush specification created with
tweak_brush(), an installed mypaint brush name,.mybfile path, JSON brush string, orNULLfor solid borders.- fill_brush
Fill brush specification created with
tweak_brush(), an installed mypaint brush name,.mybfile path, JSON brush string, orNULLfor solid fills.- hand
Optional hand-drawn geometry applied to both outline and hatch by default.
- stroke_hand
Optional hand-drawn geometry for the outline.
- fill_hand
Optional hand-drawn geometry for the hatch strokes.
- auto_solid_bg
Reserved for future parity with device-level style controls.
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
ggplot2::ggplot(mtcars, ggplot2::aes(factor(cyl))) +
geom_mypaint_bar(fill_pattern = hatch())
}