View source: R/utils-add-major-ticks.R
add_major_ticks | R Documentation |
ggplot2::geom_linerange()
Create a vector of labels to use when major and minor tick marks are
to be used in a plot, and the custom tick data frame to be used to draw
the lines outside the ggplot panel area using ggplot2::geom_linerange()
add_major_ticks(
g,
x_breaks = NULL,
modulo = 5,
prop = 0.8,
major_tick_thickness = 0.5,
...
)
g |
A |
x_breaks |
A vector of values which are where all the x-axis ticks
are located on the plot |
modulo |
The number to use as a modulus so that every n-th tick mark is a major tick |
prop |
A value between 0 and 1 to multiply the length of the major tick lines by. This is used in case the full length ticks are overlapping the tick labels |
major_tick_thickness |
The thickness of the major tick marks |
... |
Absorbs arguments meant for other functions |
A ggplot2::ggplot()
object, the original plot g
with x-axis
ticks modified to be minor and major ticks
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.