Description Usage Arguments Value
Sometimes you may want to put the x axis in certain locations other than the periphery of the plot as in the default ggplot option. Here I only implemented the version for x axis but it would be trivial for y axis as well. The underlying rationale is simple. Draw the axis and put on the labels.
1 2 3 4 5 6 7 8 9 10 | get_time_axis(
min_x,
max_x,
x_name,
AP,
y_level = 0,
shorten_ratio = 0.85,
ticks_df = NULL,
tick_height = 0.005
)
|
min_x |
where to draw the x axis from |
max_x |
where the axis ends |
x_name |
name for the x axis |
AP |
aesthetic paameters |
y_level |
which y coordinate |
shorten_ratio |
shorten the x axis from |
ticks_df |
a dataframe for plotting the axis ticks |
a list of ggplot layers, must contain a column called x
for the
locations of the ticks and the labels to put on
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.