[R] How to make legend with line+ character

Mario Valle mvalle at cscs.ch
Mon Apr 26 14:12:33 CEST 2010


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 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
>> letters. Any idea?
>>
>> plot(1:10,10:1,lty=1,type='b', lwd=2,pch='a')
>> legend("left", legend=c("ds1","ds2"), bty='n', col=1:2,
>> lty=2,lwd=4,pch=letters)
>
>
> I'd fake it rather quickly using lty="14"
>
> Uwe Ligges
>
>
>> Thanks for your help!
>> mario

-- 
Ing. Mario Valle
Data Analysis and Visualization Group            | 
http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82



More information about the R-help mailing list