primitive_ticks {legendry} | R Documentation |
Guide primitive: line
Description
This function constructs a ticks guide primitive.
Usage
primitive_ticks(key = NULL, bidi = FALSE, theme = NULL, position = waiver())
Arguments
key |
A standard key specification. See more information in the linked topic. |
bidi |
A |
theme |
A |
position |
A |
Value
A PrimitiveTicks
primitive guide that can be used inside other
guides.
Styling options
Below are the theme options that determine the styling of this guide, which may differ depending on whether the guide is used in an axis or in a legend context.
Common to both types is the following:
As an axis guide
-
axis.ticks.{x/y}.{position}
an<element_line>
for major tick lines. -
axis.minor.ticks.{x/y}.{position}
an<element_line>
for minor tick lines. -
legendry.axis.mini.ticks
an<element_line>
internally inheriting from the minor ticks for the smallest ticks in e.g. log axes. -
axis.ticks.length.{x/y}.{position}
a<unit>
for the major ticks length. -
axis.minor.ticks.length.{x/y}.{position}
a<unit>
for the minor ticks length. -
legendry.axis.mini.ticks.length
a<unit>
internally inheriting from the minor tick length for the smallest ticks in e.g. log axes.
As a legend guide
-
legend.ticks
an<element_line>
for major tick lines. -
legendry.legend.minor.ticks
an<element_line>
for minor tick lines. -
legendry.legend.mini.ticks
an<element_line>
for the smallest ticks in e.g. log axes. -
legend.ticks.length
a<unit>
for the major ticks length. -
legendry.legend.minor.ticks.length
a<unit>
for the minor ticks length. -
legendry.legend.mini.ticks.length
a<unit>
for the smallest ticks in e.g. log axes.
See Also
Other primitives:
primitive_box()
,
primitive_bracket()
,
primitive_fence()
,
primitive_labels()
,
primitive_line()
,
primitive_segments()
,
primitive_spacer()
,
primitive_title()
Examples
# A standard plot
p <- ggplot(mpg, aes(displ, hwy)) +
geom_point()
# Adding as secondary guides
p + guides(x.sec = primitive_ticks(), y.sec = primitive_ticks())