pch size in a legend

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

pch size in a legend

Ahmed Attia
Hi R users,

I would like to adjust the pch size in a legend without changing the
text size, pt.cex does not do the job. R 2.15.2 32 bit.

legend(0,2100, legend=c("2009","2010","2012","2013","2014"),
col = 1,cex=1,lty=NA,pch=c(1,2,6,7,8),lwd=2,bty="n")

Thanks


Ahmed Attia, Ph.D.
Agronomist & Soil Scientist

Post-Doc Research Associate
Texas A&M AgriLife Research-Vernon
[hidden email]
Cell phone: 001-979-248-5215

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: pch size in a legend

Jim Lemon-4
Hi Ahmed,
Hmmm, this seems to work for me (R-3.1.2, Linux)

legend(0,2100, legend=c("2009","2010","2012","2013","2014"),
 col = 1,cex=1,lty=NA,pch=c(1,2,6,7,8),lwd=2,bty="n",pt.cex=2)

Jim



On Sat, Jan 31, 2015 at 8:49 AM, Ahmed Attia <[hidden email]> wrote:

> Hi R users,
>
> I would like to adjust the pch size in a legend without changing the
> text size, pt.cex does not do the job. R 2.15.2 32 bit.
>
> legend(0,2100, legend=c("2009","2010","2012","2013","2014"),
> col = 1,cex=1,lty=NA,pch=c(1,2,6,7,8),lwd=2,bty="n")
>
> Thanks
>
>
> Ahmed Attia, Ph.D.
> Agronomist & Soil Scientist
>
> Post-Doc Research Associate
> Texas A&M AgriLife Research-Vernon
> [hidden email]
> Cell phone: 001-979-248-5215
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: pch size in a legend

Yasir Kaheil
This post has NOT been accepted by the mailing list yet.
In reply to this post by Ahmed Attia
use pt.cex
Yasir Kaheil
Reply | Threaded
Open this post in threaded view
|

Re: pch size in a legend

gnustats
In reply to this post by Jim Lemon-4
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: pch size in a legend

Allen Bingham
In reply to this post by Ahmed Attia
Could you provide an example of trying to use pt.cex that "does not do the
job"?

Using pt.cex works fine for me when I've used it (R version 3.1.2 both 32
bit and 64 bit).

Here's some dummy code that demonstrates that the symbol size changes w/o
changing the text size:

   plot(x=c(0,6),y=c(0,6),type="n")
   legend(x="bottomright",title="Legend 1, symbol 2 with
pt.cex=1.25",legend=c("Item 1","Item
2"),pch=c(1,1),pt.cex=c(1,1.25),col=c('black','blue'))
   legend(x="topleft",title="Legend 2, symbol 2 with
pt.cex=1.75",legend=c("Item 1","Item
2"),pch=c(1,1),pt.cex=c(1,1.75),col=c('black','blue'))

see if that works for you?


______________________________________
Allen Bingham
Bingham Statistical Consulting

[hidden email]


-----Original Message-----
From: Ahmed Attia [mailto:[hidden email]]
Sent: Friday, January 30, 2015 1:50 PM
To: r-help
Subject: [R] pch size in a legend

Hi R users,

I would like to adjust the pch size in a legend without changing the text
size, pt.cex does not do the job. R 2.15.2 32 bit.

legend(0,2100, legend=c("2009","2010","2012","2013","2014"),
col = 1,cex=1,lty=NA,pch=c(1,2,6,7,8),lwd=2,bty="n")

Thanks


Ahmed Attia, Ph.D.
Agronomist & Soil Scientist

Post-Doc Research Associate
Texas A&M AgriLife Research-Vernon
[hidden email]
Cell phone: 001-979-248-5215

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.