Displaying 1 result from an estimated 1 matches for "archuves".
Did you mean:
archives
2010 Dec 09
1
2 plots with different scales in the same graphical window
Dear useRs,
I have two sets of data that I would like to plot in the same window, but their
ranges are really different, e.g.
a <- c(0.2, 0.5, 0.8, 0.3, 0.4, 0.5, 0.2, 0.2, 0.3)
b <- c(100, 2000, 800, 200, 100, 50, 4, 2, 0)
If I do
plot(a, ty='l'); points(b, ty='l')
I won't be able to see sequence b.
However, if I do
plot(b, ty='l'); points(a, ty='l')