skewed_axis | R Documentation |
Draw skewed axes in ggplot2
skewed_axis(
theta,
axis_title = "X",
draw_ticks = TRUE,
draw_axis_text = TRUE,
remove_origin = TRUE,
tick_height = 0.02,
lwd = 0.5,
text_size = 12,
color = NA,
family = NA,
mu = 0,
sigma = 1,
tick_label_interval = ifelse(sigma%%3 == 0, 3, 2)
)
theta |
angle in radians |
axis_title |
character |
draw_ticks |
logical |
draw_axis_text |
logical |
remove_origin |
logical |
tick_height |
height of ticks |
lwd |
line width |
text_size |
size of text |
color |
color of lines |
family |
font family |
mu |
mean of variable |
sigma |
standard deviation of variable |
tick_label_interval |
interval of ticks |
plot
library(ggplot2)
ggplot(data.frame(x = c(0,1), y = c(4,4))) +
skewed_axis(pi / 2, color = "black") +
skewed_axis(pi / 4, color = "black") +
skewed_axis(0, color = "black") +
theme_void() +
coord_equal()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.