Multiple line chart

55 Views Asked by At

I am trying to plot two line curves on one chart using plot() and then lines(). But with this the second line curve goes out of chart and is half plotted.

plot(A, main="Bot",xlab="Days",ylab="$$$",type='l',col = 'Green')
lines(B, main="Bot",col = 'Red')

Am I missing any parameter for the scale?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

Compute the minimum value for y on the red curve, then add the parameter ylim=c(MinY, 4000) into your first plot.