Rep: [R] pdf() function, screen command and graphs

Dominique Couturier dominique.couturier at unine.ch
Sun Dec 7 01:21:04 CET 2003


Hi all,
There was no unwanted space bar in my code.
Screen seems not to like... (it works with the mfrow argument of par() 
but is (in my point of view) less flexible)
I upgrade then to 1.8.1 and it now works!
thanks
DLC

> Works perfectly (if garishly) for me in R 1.8.1.
> Perhaps you could benefit from an R upgrade?
>
> [I presume a line got wrapped, BTW, and if you had made good use of 
> your
> space bar it would not have produced invalid code ....]
>
> On Sat, 6 Dec 2003, Dominique Couturier wrote:
>
>> Dear [R]-list,
>>
>> I am trying to do a pdf() of the following graphs but don't understand
>> why the pdf() function does produce an empty pdf file.
>> (I use R1.7.0 on MacOS 10.2.8)
>> any idea? Is pdf() incompatible with screen?
>> Thanks a lot,
>> DLC
>>
>> ## create dataset
>> x=rnorm(1000,10,2)
>> y=rpois(1000,5)
>>
>> ## graphs
>>   pdf()
>>    par(col.main=4,omi=c(0,0,1.25,0))
>>          split.screen(c(1,2))
>>          screen(1);split.screen(c(2,1))
>>
>>          screen(3) ## gauche en haut
>>          boxplot(x,col=3,main="my boxplot")
>>
>>          screen(2) ## droite seul
>>          barplot(table(y),col=4,main="my barplot")
>>
>>          screen(4) ## gauche en bas
>>          qqnorm(x,main="mon qqnorm");qqline(x,col=5)
>>          mtext(paste("Graphics are important","\n","I love
>> R"),side=3,col=2,cex=1.5,outer=T)
>>    dev.off()
>>
>> ## remove dataset
>>   rm(x,y)
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>>
>>
>
> -- 
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>




More information about the R-help mailing list