# NOT RUN {
# }
# NOT RUN {
# 'numeric':
amPlot(x = rnorm(100))
# 'character':
start <- as.POSIXct('01-01-2015', format = '%d-%m-%Y')
end <- as.POSIXct('31-12-2015', format = '%d-%m-%Y')
date <- seq.POSIXt(from = start, to = end, by = 'day')
date <- format(date, '%m-%d-%Y')
y <- rnorm(length(date))
amPlot(x = date, y = y, type = 'l', parseDates = TRUE, dataDateFormat = "MM-DD-YYYY")
# notice that by default 'parseDates = FALSE'
# 'data.frame'
amPlot(iris, col = colnames(iris)[1:2], type = c("l", "st"), zoom = TRUE, legend = TRUE)
# 'formula':
amPlot(Petal.Length + Sepal.Length ~ Sepal.Width, data = iris, legend = TRUE, zoom = TRUE)
# }
# NOT RUN {
# }
# NOT RUN {
# Other examples available which can be time consuming depending on your configuration.
library(data.table)
iris <- as.data.table(get("iris", "package:datasets"))
x <- rnorm(100)
# Simple scatter plot with title and color
# Also change type (set to "p" by default), avalaible "l", "sl", "st", "p", "b"
amPlot(x = x, main = "Title", col = "lightblue", type = "b")
x <- sort(rnorm(100))
y <- runif(100)
weights <- runif(100, 0, 15)
amPlot(x = x, y = y, weights = weights)
# }
Run the code above in your browser using DataLab