[R] Graphic window dimensions

Uwe Ligges ligges at statistik.tu-dortmund.de
Sun Apr 7 17:41:56 CEST 2013



On 07.04.2013 09:53, Eva Prieto Castro wrote:
>
> Hi Uwe,
>
> Thank you for your help. Then, how can I know (in runtime) then max
> width and height I can use?. If it depends on the screen inches, I
> should obtain those values in runtime, is this true?.
>
> The appearance in graphic window must be vertical (as A4 paper or
> something like that), apart from the fact that the result of pdf created
> must be the same as A4 paper.

Well, since it rescales, I'd just open the screen as you proposed and use
      dev.print(pdf, file="test.pdf", width=8.27, height=11.69)
or whatever afterwards to copy *iff* you do not want to use the pdf 
device directly, which is recommended.

Best,
Uwe Ligges





>
> Regards,
>
> Eva
>
> --- El *dom, 7/4/13, Uwe Ligges /<ligges at statistik.tu-dortmund.de>/*
> escribió:
>
>
>     De: Uwe Ligges <ligges at statistik.tu-dortmund.de>
>     Asunto: Re: [R] Graphic window dimensions
>     Para: "Eva Prieto Castro" <evapcastro at yahoo.es>
>     CC: r-help at r-project.org
>     Fecha: domingo, 7 de abril, 2013 01:22
>
>
>
>     On 06.04.2013 08:53, Eva Prieto Castro wrote:
>      > Dear all,
>      >
>      > I have a doubt: if I run windows(width=8.27,
>      > height=11.69), the size of an A4 paper, does it work correctly in all
>      > screens?
>
>     Correctly: yes, but not as you expect. It keeps the aspect ration
>     but in
>     a smaller size if the screen is smaller than the size you specified.
>
>
>      >Or does it depend on the inches of my screen?.
>
>     Yes.
>
>
>      > I ask
>      > you about this question because I need to make the user see a
>     graph in
>      > the graph window and he must be able to save the graph as a pdf
>     (using
>      > the Rgui menu) and the result must be a pdf with A4 size.
>
>     Why not use pdf() directly?
>
>     Anyway, you can
>        dev.print(pdf, file="test.pdf", width=8.27, height=11.69)
>
>     Best,
>     Uwe Ligges
>
>
>      > Thank you in advance.
>      >
>      > Regards,
>      >
>      > Eva
>      >     [[alternative HTML version deleted]]
>      >
>      > ______________________________________________
>      > R-help at r-project.org </mc/compose?to=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.
>      >
>



More information about the R-help mailing list