[R] Is this a bug? (layout and par)

Peter Ehlers ehlers at ucalgary.ca
Mon Feb 15 16:24:23 CET 2010


On 2010-02-15 7:06, Martin Ivanov wrote:
>   Dear R users,
>
> I think I have spotted a bug in R, but as I am not sure, I first post it to you.
> Here is a minimal working example:
>
> default<- par(no.readonly=TRUE);
> par(font=1, adj=0.5, cex=1, cex.lab=1, cex.axis=0.5, font.axis=2, lend=2, family="Times",
> omi=c(0, 0, 0, 0))
> layout(mat=matrix(data=1, nrow=1), widths=lcm(7.8), heights=lcm(.8), respect=FALSE);
> par(mai=c(1, 9 + 20, 0, 1)/25.4);
> plot(x=.5, y=.5, , xaxs="i", yaxs="i", type="n", xaxt="n", yaxt="n", asp=NA)
> par(default);
>
> As you can see there is a number 0.5 written in the left figure region, although all writing
> is explicitly suppressed. Moreover, if I modify the last but one command like this:
> plot(x=.5, y=c(.5) , xaxs="i", yaxs="i", type="n", xaxt="n", yaxt="n", asp=NA)
>
> the output in the left margin is "c(0.5". Does anyone have an explanation? Is this a bug?
> Can this problem be solved?

But ylab is not suppressed. Add ylab="" to your (weird) plot call.

  -Peter Ehlers

>
> Regards,
>
> Martin Ivanov
>
> ______________________________________________
> 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.
>
>

-- 
Peter Ehlers
University of Calgary



More information about the R-help mailing list