draw_axis_line: draw_axis_line

Description Usage Arguments Value Examples

View source: R/draw_axis_line.R

Description

The source code from the url: https://stackoverflow.com/questions/17753101/center-x-and-y-axis-with-ggplot2

Usage

1
draw_axis_line(length_x, length_y, tick_step = NULL, lab_step = NULL)

Arguments

length_x

the length of x axis, a numeric

length_y

the length of y axis, a numeric

tick_step

the length of tick's step, a numeric

lab_step

the length of label's step, a numeric

Value

an object of ggplot that we can add ggplot layer by "+"

Examples

1
2
3
p <- draw_axis_line(20, 4)
library(ggplot2)
p + geom_point(aes(x =1, y =1))

Zachary-Wu/learn documentation built on Aug. 14, 2020, 12:39 a.m.