[R] Legends for line and point data

Petr PIKAL petr.pikal at precheza.cz
Mon Mar 29 16:51:27 CEST 2010


Hi

r-help-bounces at r-project.org napsal dne 29.03.2010 16:13:31:

> Hi,
> Your question is really vague.
> What about legend(lty=, pch=)?

Well, it is probably not mentioned explicitly in ?legend but he is 
probably seeking

legend(..., lty=c(1,NA, 2,3), pch=c(NA, 16, NA,NA))

Regards
Petr

> Ivan
> 
> Le 3/29/2010 12:45, Steve Murray a écrit :
> > Dear all,
> >
> > I have a plot which contains 4 data series displayed using solid, 
dashed and
> dotted lines, and also points. How do I use lty and pch together to 
signify 
> that the first legend item is a solid line, the second is point data 
(pch=16),
> the third is dashed and the fourth is dotted?
> >
> > Many thanks,
> >
> > Steve
> > 
> > _________________________________________________________________
> > Do you have a story that started on Hotmail? Tell us now
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> > 
> 
> -- 
> Ivan CALANDRA
> PhD Student
> University of Hamburg
> Biozentrum Grindel und Zoologisches Museum
> Abt. Säugetiere
> Martin-Luther-King-Platz 3
> D-20146 Hamburg, GERMANY
> +49(0)40 42838 6231
> ivan.calandra at uni-hamburg.de
> 
> **********
> http://www.for771.uni-bonn.de
> http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list