Dipesh Surana
Dipesh Surana

Reputation: 93

Multiple line chart

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

Upvotes: 0

Views: 49

Answers (1)

G5W
G5W

Reputation: 37641

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

Upvotes: 2

Related Questions