[R] Plotting two lines on a graph when using par(mfrow=)

eric ericstrom at aol.com
Sun Feb 27 19:06:06 CET 2011


Basic question but still learning ....

How do I plot two lines (f$equity and f$bh.equity) on one of the three
graphs under mfrow ? I tried putting brackets around the first plot and
lines command but that didn't work.

par(mfrow=c(3,1))
{plot(f$Date,f$equity, col="blue", type="l", main="equity")
lines(f$bh.equity, col="gray")}
plot(f$Date,f$indicator, col="green", type="l", main="indicator")
plot(f$Date, f$SPY, col="red", type="l", main="SPY")

What I want is the first graph to have two lines(equity and bh.equity), then
the next two graphs to have one line each.

-- 
View this message in context: http://r.789695.n4.nabble.com/Plotting-two-lines-on-a-graph-when-using-par-mfrow-tp3326979p3326979.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list