skewed_axis: Draw skewed axes in ggplot2

View source: R/main.R

skewed_axisR Documentation

Draw skewed axes in ggplot2

Description

Draw skewed axes in ggplot2

Usage

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)
)

Arguments

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

Value

plot

Examples

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()

wjschne/WJSmisc documentation built on June 29, 2023, 8:04 a.m.