View source: R/primitive-ticks.R
primitive_ticks | R Documentation |
This function constructs a ticks guide primitive.
primitive_ticks(key = NULL, bidi = FALSE, theme = NULL, position = waiver())
key |
A standard key specification. See more information in the linked topic. |
bidi |
A |
theme |
A |
position |
A |
A PrimitiveTicks
primitive guide that can be used inside other
guides.
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:
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.
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.
Other primitives:
primitive_box()
,
primitive_bracket()
,
primitive_fence()
,
primitive_labels()
,
primitive_line()
,
primitive_segments()
,
primitive_spacer()
,
primitive_title()
# 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())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.