Description Usage Arguments Examples
Given a numeric vector or a ggplot object, the function will check the range, labels and label positions (the same as major grid lines) that will used on the axis. The result is a length 5 list for min limit, max limit, labels, major grid-line positions, all (major and minor) grid-line positions.
| 1 2 3 4 5 6 7 8 9 | 
| a | extreme values of a numeric vector. Note: only 
one of  | 
| b | another extreme value if  | 
| v | a numeric vector. | 
| gg | a gg object created by ggplot function.
Which value will be checked depends on  | 
| mult | default is 0.05 and should be of length 
1 or 2. It mimics the  | 
| add | default is 0. It mimics the  | 
| axis | if  | 
| 1 2 3 4 5 6 7 | get_gg_label(a=1, b=1000)
# The following three have the same results.
get_gg_label(a=1, b=1000, mult=0)
get_gg_label(v=c(1, 500, 1000), mult=0)
p=ggplot()+geom_point(aes(1: 3, c(1, 500, 1000)))+
  scale_y_continuous(expand=expansion(mult=0))
get_gg_label(gg=p)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.