Hi,

I want to plot two graphs on the same plot in R. IN MATLAB we can use the ‘hold on’ command to do so.

How to do this in R?

I used this code->

plot(l,col=‘green’,type=‘l’)

par(new=TRUE)

plot(k,col=‘red’,type=‘l’)

but I am getting a graph like this->

The two graphs overlap and so do their markings and labels on the y axes. How to plot them on the same scale of x and y axes?

Thanks.