Takes a numeric vector and several parameters and outputs an object with values and labels ideal for given data
auto.axis( x, pretty = TRUE, log.scaled = NA, log.zero = 0.1, max.factor = 1, min.factor = 1, include.origin = TRUE, num.labels = 5, max.min.log10.diff = 2 )
Numeric vector to be scaled
Parameter flag for if output should be in pretty format
parameter set to determine if scaling is logarithmic or not
log 0 starting point
maximum factor for y variable
minimum factor for y variable
flag to include the origin value or not
number of labels to output
the max and min diffrence for dataset to be determined logarithmic
Takafumi N. Yamaguchi
stripplot, lattice or the Lattice book for an overview of the package.
stripplot
lattice
set.seed(223); simple.data <- data.frame( x = sample(1:15, 10), y = LETTERS[1:10] ); auto.axis(simple.data$x) data2 <- c(1,10,100,1000) auto.axis(data2)
Run the code above in your browser using DataLab