Quantcast
Viewing latest article 15
Browse Latest Browse All 18

Answer by Sam for Plot two graphs in a same plot

You can also use par and plot on the same graph but different axis. Something as follows:

plot( x, y1, type="l", col="red" )par(new=TRUE)plot( x, y2, type="l", col="green" )

If you read in detail about par in R, you will be able to generate really interesting graphs. Another book to look at is Paul Murrel's R Graphics.


Viewing latest article 15
Browse Latest Browse All 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>