[R] how to automatically maximize the graph window (under XP) ?

Ptit_Bleu ptit_bleu at yahoo.fr
Thu Jul 3 09:27:05 CEST 2008


Hello,

Thanks Leandro for your solution.
But, in fact, it doesn't match what I'm trying to do ... due to the fact
that I didn't clearly tell you what I'm trying to do.

I tested the command jpeg() but it doesn't display the curve and I need to
see it before saving it.

Here is a small example of my script :

x11()
plot(1:10,1:10, pch=20, col="lightblue", ylab="y", xlab="x", cex.axis=1.5,
cex.lab=1.5, cex.main=1.5, cex=1.5, ylim=c(0,12))
points(5, 8, pch=20, col="red", cex=1.5)
smartlegend(x="right",y="bottom", inset = 0.02,
            c("BlaBlaBlaBla", "BlaBlaBlaBla"),
            col = c( "red", "lightblue"), pch=20, cex=1.5)

The x11() command opens a graphic device whose size is 6.99999 6.99999
(given by par("din")).
(By the way, if I maximize the window, par("din") again gives 6.9999
6.99999).
With this size, the legend is ok. But if I maximize the window, there is a
lot of whit space in the legend box which occupies too much place.
If I launch again the script, but without the x11() command, in a maximized
window, the legend display is ok.
That's why I would like to directly open a full screen graphic window before
plotting the legend.

I hope this explaination is clearer and that somebody will have a solution.
Thanks in advance,
Ptit Bleu.

-- 
View this message in context: http://www.nabble.com/how-to-automatically-maximize-the-graph-window-%28under-XP%29---tp18219242p18252841.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list