Skip to content

Plot many x and y

3 messages · Alaios, Joshua Wiley, Stephan Kolassa

#
Dear all

could you please plot many x's and y's with one legend per plot?

I would like to thank you in advance for your help

Best Regards
Alex.
#
Hi Alex,

You have not given enough details for us to answer your question.  Is
this something like what you mean?

par(mfcol = c(2, 2))
plot(1:10, 1:10, pch = 16)
legend(x = 2, y = 8, legend = "Test 1", pch = 16)
plot(1:10, 1:10, pch = 15)
legend(x = 2, y = 8, legend = "Test 2", pch = 15)
plot(1:10, 1:10, pch = 14)
legend(x = 2, y = 8, legend = "Test 3", pch = 14)
plot(1:10, 1:10, pch = 13)
legend(x = 2, y = 8, legend = "Test 4", pch = 13)

The posting guide (  http://www.R-project.org/posting-guide.html )
provides some helpful tips on how to write a question that will get a
good answer.

Cheers,

Josh
On Mon, Jun 6, 2011 at 12:46 PM, Alaios <alaios at yahoo.com> wrote:

  
    
#
Hi Alex,

could you be a little more specific as to what exactly you mean by 
"plotting many x's and y's with one legend per plot"?

Please note what appears at the bottom of every R-help mail:
 > PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
 > and provide commented, minimal, self-contained, reproducible code.

Following this piece of advice usually increases your chances for a 
helpful answer.

Best,
Stephan


Am 06.06.2011 21:46, schrieb Alaios: