Re: [R] How to make legend with line+ character

2010-04-27 Thread Jim Lemon
Mario Valle wrote: Dear all, I have a multiline plot with each line labeled with a different letter. But I'm not able to make the legend display the same kind of pattern '-a-', instead the letter is overwritten by the line. A simpler legend with only the letter is not very visible and the

[R] How to make legend with line+ character

2010-04-26 Thread Mario Valle
Dear all, I have a multiline plot with each line labeled with a different letter. But I'm not able to make the legend display the same kind of pattern '-a-', instead the letter is overwritten by the line. A simpler legend with only the letter is not very visible and the pt.bg does nothing with

Re: [R] How to make legend with line+ character

2010-04-26 Thread Uwe Ligges
On 26.04.2010 13:32, Mario Valle wrote: Dear all, I have a multiline plot with each line labeled with a different letter. But I'm not able to make the legend display the same kind of pattern '-a-', instead the letter is overwritten by the line. A simpler legend with only the letter is not very

Re: [R] How to make legend with line+ character

2010-04-26 Thread Henrique Dallazuanna
You can try this: plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a') text(2, pretty(10:1)[2] - 0.3, paste(\u2013 a \u2013, ds1, sep =), col = 'black', font = 2) text(2, pretty(10:1)[2] - 0.6, paste(\u2013 b \u2013, ds2, sep =), col = 'red', font = 2) rect(0, 0, 3, 2) On Mon, Apr 26, 2010 at

Re: [R] How to make legend with line+ character

2010-04-26 Thread Mario Valle
Thanks Uwe and Henrique! Both solution works and both have the same niceness/work.required ratio :-) Thanks again! mario On 26-Apr-10 14:02, Uwe Ligges wrote: On 26.04.2010 13:32, Mario Valle wrote: Dear all, I have a multiline plot with each line labeled with a

Re: [R] How to make legend with line+ character

2010-04-26 Thread Gabor Grothendieck
Try this kludge: legend(left, c(-a-, -b-, ds1 , ds2 ), ncol = 2, text.col = 1:2) On Mon, Apr 26, 2010 at 7:32 AM, Mario Valle mva...@cscs.ch wrote: Dear all, I have a multiline plot with each line labeled with a different letter. But I'm not able to make the legend display the same kind of

Re: [R] How to make legend with line+ character

2010-04-26 Thread John Kane
=-a- , col=red) text(2.5,6, label=dg1) --- On Mon, 4/26/10, Mario Valle mva...@cscs.ch wrote: From: Mario Valle mva...@cscs.ch Subject: [R] How to make legend with line+ character To: r-help@r-project.org r-help@r-project.org Received: Monday, April 26, 2010, 7:32 AM Dear all, I have a multiline

Re: [R] How to make legend with line+ character

2010-04-26 Thread Mario Valle
='b', lwd=2,pch='a') text(1.4,6, label=-a- , col=red) text(2.5,6, label=dg1) --- On Mon, 4/26/10, Mario Vallemva...@cscs.ch wrote: From: Mario Vallemva...@cscs.ch Subject: [R] How to make legend with line+ character To: r-help@r-project.orgr-help@r-project.org Received: Monday, April 26, 2010, 7