[R] Truncated x-axis values

Stephen Tucker brown_emu at yahoo.com
Fri Mar 23 08:33:47 CET 2007


You can try playing around with oma, omi, mai, mar, etc. in par():

myMai <- par("mai")
myMai[1] <- max(nchar(y))*par("cin")[1]
par(mfrow=c(2, 1),mai=myMai,oma=rep(0,4),las = 2)
# your plot

--- "Urban, Alexander" <a-urban at ti.com> wrote:

> John
> Thanks for your reply and sorry for not beein specific enough
> Try this piece of code (it's an abstraction of my application...)
> 
> par(las = 2)
> par(mfrow=c(2, 1))
> x =  c(1,2,3,4,5,6,7,8)
> y = c("abcdccefghijk", "bcssdefghijkl", "abddessfghijk",
> "bddessfghijkl","abcdssedghijk","bcdedghijkl","assbcdefghidk","bcdedssgh
> ijkl")
> 
> boxplot(x~y)
> boxplot(x~y) 
> 
> In the lower chart the labels are truncated...(not totally visible)
> Is this clearer now?
> 
> Thanks
> Alex
> 
> -----Original Message-----
> From: John Kane [mailto:jrkrideau at yahoo.ca] 
> Sent: Thursday, March 22, 2007 19:19
> To: Urban, Alexander; r-help at stat.math.ethz.ch
> Subject: Re: [R] Truncated x-axis values
> 
> You really have not told us much about what you're actually doing.  A
> simple self-contained example of what you're trying to do might let
> someone help. 
> 
> Have you read the posting guide?
> 
> --- "Urban, Alexander" <a-urban at ti.com> wrote:
> 
> > Hello
> > 
> > I'm new to this group. I looked up the last two hour in the help file 
> > and in the archives of this group, but didn't find anything.
> > I hope my question is not too dump:
> > I'm printing a graph with vertical labels on the x-axis (necessary due
> 
> > to many labels). Unfortunately the png truncates the labels halfway 
> > through, so that you can only read the last 7 digits of the label.
> > Snice I'm already asking :-): Is there a possibility to tell R: If 
> > there are so many labels that you write them on top of each other, 
> > take only e.g. every 2nd...
> > 
> > Sorry for bothering and thanks
> > Alex
> > 
> > ______________________________________________
> > R-help at stat.math.ethz.ch 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.
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?

> http://mail.yahoo.com
> 
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
> 



 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.



More information about the R-help mailing list