[R] Hmisc curve label size & cex

Brian O'Connor boconnor at lakeheadu.ca
Sat Apr 28 21:38:43 CEST 2007


Thanks for your reply Frank.

I realize that the cex values are relative. The problem is that for 
high resolutions, cex has to be high (e.g., around 5) for the tick 
and curve labels to be legible. The curve and tick labels were tiny 
when I used cex=1 and set the other cex values to 1/5. But when cex 
is high, then the Hmisc curve labels become too large. I don't doubt 
that I'm doing something wrong, I just can't figure out what.

And I want the integer curve labels because I will have many lines 
and multiple plots, and need to keep the labels brief.

Thanks.


>Brian O'Connor wrote:
>>R-Masters,
>>
>>I need to produce high resolution line plots and place labels on 
>>the curves. It seems that cex must be high relative to the other 
>>cex values in order to produce sufficiently large & legible tick 
>>labels at high resolutions. But high cex values cause the curve 
>>labels to become gigantic when using Hmisc. I've struggled and 
>>searched the archives, but cannot find a way of controlling the 
>>sizes of the curve labels in this situation.
>>
>>These commands produce the problem on my PC using XP:
>>
>>
>>png("trial.png", width=3000, height=2400, res = 600, pointsize=12 )
>>par(ann=F, font.main=1, font.lab=1, font.axis=1, cex=5, cex.main=1, 
>>cex.lab=1, cex.axis=1,
>>     lwd=12, las=1, mar=c(4, 4, 2, 2)   )
>>
>>x = seq(-2.5, 2.5, length=100)
>>
>>labcurve( list( One=  list( x,sin(x)), Two=  list( x,cos(x)),
>>    Three=list( x,(x*x)), Four= list( x,exp(x)) ),
>>    keys=c('1','2','3','4'),  keyloc="none", pl=TRUE )
>>
>>dev.off()
>>
>>
>>Thanks for your time.
>>
>
>cex.main .lab .axis etc. are relative so yo need for your case to 
>specify something like cex.axis=1/5
>
>Not sure why you are using keys of 1-4 when you've already given 
>nice labels.  I tried
>
>  labcurve( list( One=  list( x,sin(x)), Two=  list( x,cos(x)),
>     Three=list( x,(x*x)), Four= list( x,exp(x)) ),
>     pl=TRUE )
>
>and got some nice output after reducing cex.*
>
>Frank
>
>--
>Frank E Harrell Jr   Professor and Chair           School of Medicine
>                      Department of Biostatistics   Vanderbilt University


-- 
----------------------------------------------------------
----------------------------------------------------------
Brian O'Connor
Department of Psychology
Lakehead University
955 Oliver Road
Thunder Bay, Ontario, Canada
P7B 5E1
(807) 343-8322
Fax: (807) 346-7734
e-mail: brian.oconnor at lakeheadu.ca

alternate e-mail: boconnor at tbaytel.net

http://flash.lakeheadu.ca/~boconno2/boconnor.html



More information about the R-help mailing list