[R] How to plot multiple data sets with different colors (also with legend)?

2009-10-18 Thread Peng Yu
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?

Re: [R] How to plot multiple data sets with different colors (also with legend)?

2009-10-18 Thread Matthieu Dubois
Hi, the blue point is not shown simply because it is printed outside the current plot area. If you want to use the base graphics, you have to manually define the xlim and ylim of the plot. Legend is added with the command legend. E.g. x=rbind(c(10,11),c(10,11)) y=cbind(-1:0,-1:0)

Re: [R] How to plot multiple data sets with different colors (also with legend)?

2009-10-18 Thread Jim Lemon
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

Re: [R] How to plot multiple data sets with different colors (also with legend)?

2009-10-18 Thread Peng Yu
On Sun, Oct 18, 2009 at 5:42 PM, Matthieu Dubois matth...@gmail.com wrote: Hi, the blue point is not shown simply because it is printed outside the current plot area. If you want to use the base graphics, you have to manually define the xlim and ylim of the plot. Legend is added with the

Re: [R] How to plot multiple data sets with different colors (also with legend)?

2009-10-18 Thread Ista Zahn
Hi Peng, Comments below. On Sun, Oct 18, 2009 at 9:22 PM, Peng Yu pengyu...@gmail.com wrote: On Sun, Oct 18, 2009 at 5:42 PM, Matthieu Dubois matth...@gmail.com wrote: Hi, the blue point is not shown simply because it is printed outside the current plot area. If you want to use the base