gizmo_grob {legendry} | R Documentation |
Guide gizmo: custom grob
Description
This guide displays a user-provided grob.
Usage
gizmo_grob(
grob,
width = grobWidth(grob),
height = grobHeight(grob),
hjust = 0.5,
vjust = 0.5,
position = waiver()
)
Arguments
grob |
A |
width , height |
A [ |
hjust , vjust |
A |
position |
Where this guide should be drawn: one of |
Value
A <GizmoGrob>
object.
See Also
Other gizmos:
gizmo_barcap()
,
gizmo_density()
,
gizmo_histogram()
,
gizmo_stepcap()
Examples
circle <- grid::circleGrob()
# A standard plot with grob gizmos
ggplot(mpg, aes(displ, hwy, colour = cty)) +
geom_point() +
guides(
x.sec = gizmo_grob(
circle, hjust = 0.75,
width = unit(2, "cm"), height = unit(2, "cm")
),
colour = gizmo_grob(
circle, width = unit(1, "cm"), height = unit(1, "cm")
)
)
[Package legendry version 0.2.0 Index]