[R] Line Graph - Greater than 2 variables on plot
Wayne Aldo Gavioli
wgavioli at fas.harvard.edu
Fri Sep 21 03:57:31 CEST 2007
Hello all,
I was wondering if anyone knew how to construct a multiple line graph on R,
where there are 2 (or more) sets of data points plotted against some x axis of
data, and you can draw a line on the graph connecting each set of data points.
For example:
A B C D
0.6566 2.1185 1.2320 5
0.647 2.0865 1.2325 10
0.6532 2.1060 1.2287 15
0.6487 2.1290 1.2313 20
0.6594 2.1285 1.2341 25
0.6577 2.1070 1.2343 30
0.6579 2.1345 1.2340 35
0.6734 2.1705 1.2362 40
0.675 2.1845 1.2372 45
0.6592 2.1550 1.2340 50
0.6647 2.1710 1.2305 55
Would there be a way:
a) To graph all the points of data in sets A, B and C as Y coordinates on one
graph, using the points in set D as the X-axis/coordinates for all 3 sets (A, B
and C)?
b) To be able to draw 3 lines on the graph that connect each set of data (1 line
connects all the A points, one line connects all the B points, one line connects
all the C points)
I couldn't find anything in the examples or the help section about multiple
lines on the same graph, only one line.
Thanks,
Wayne
More information about the R-help
mailing list