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

Martin Ivanov tramni at abv.bg
Mon Feb 15 15:06:41 CET 2010


 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?

Regards, 

Martin Ivanov



More information about the R-help mailing list