amLines: amLines adds a serie to a graph.

Description Usage Arguments Note Examples

View source: R/chart_amPlot.R

Description

amLines adds a new serie to an existing serial chart.

Usage

1
2
amLines(chart, x = NULL, y = NULL, type = c("points", "line",
  "smoothedLine"), col = "#0066cc", title)

Arguments

chart

AmChart. Chart you wish to add the new serie.

x

numeric, equivalent to y, deprecated.

y

numeric.

type

(optionnal) character. Possible values are : "l" for line, "p" for points, "sl" for smoothed line.

col

character, color of the new serie.

title

character, name of the new serie, used when legend is enabled.

Note

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
require(pipeR)
amPlot(x = rnorm(100), type = 'sl') %>>%
  amLines(x = rnorm(100), type = "p")
  

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")

rAmCharts documentation built on May 19, 2017, 7:21 a.m.

Search within the rAmCharts package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.