amLines | R Documentation |
amLines adds a new serie to an existing serial chart.
amLines( chart, x = NULL, y = NULL, type = c("points", "line", "smoothedLine", "both", "step"), col = "#0066cc", title, fill_alphas = 0, balloon = T )
chart |
AmChart. Chart you wish to add the new serie. |
x |
|
y |
|
type |
(optionnal) |
col |
|
title |
|
fill_alphas |
a |
balloon |
|
It is supposed here that x or y corresponds to the y-axis, and the x-axis is automatically linked to the x values of the chart "chart". That is why it makes sense to give the y argument.
if (requireNamespace("pipeR", quietly = TRUE)) { require(pipeR) amPlot(x = rnorm(100), type = 'sl') %>>% amLines(x = rnorm(100), type = "p") } ## Not run: amPlot(x = rnorm(100), type = 'sl') %>>% amLines(x = rnorm(100), col = "blue") %>>% amLines(x = rnorm(100), type = "sl") %>>% amLines(x = rnorm(100), type = "p") # For an XY chart x <- sort(rnorm(100)) y1 <- rnorm(100, sd = 10) y2 <- rnorm(100, sd = 10) y3 <- rnorm(100, sd = 10) amPlot(x = x, y = y1) %>>% amLines(x = y2, col = "blue") %>>% amLines(x = y3, type = "p") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.