[R] How to plot multiple data sets with different colors (also with legend)?
jim at bitwrit.com.au
Mon Oct 19 01:02:00 CEST 2009
On 10/19/2009 07:37 AM, Peng Yu wrote:
> The following commands only show the data in 'y'. I'm wondering how to
> show the data in 'x' as well. I also want to add a legend to show that
> blue points corresponds to 'x' and yellow points correspond to 'y'.
> Could somebody let me know what the correct commands should be?
To show the "x" points, you will have to set both the xlim and ylim
I'm not sure why you are passing the points as matrices, but this means
that the "x" points are the same.
More information about the R-help