[R] Setting plot() parameters

Gabor Grothendieck ggrothendieck at gmail.com
Fri Mar 21 04:37:56 CET 2014


On Thu, Mar 20, 2014 at 7:13 PM, Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Thu, 20 Mar 2014, Rich Shepard wrote:
>
>   For time series plots using zoo I want the layout to be horizontal
> rectangles rather than squares. When I specify par(pin = c(5,2.5)) nothing
> happens; the plot frame is square regardless of specifying pin within the
> plot command or prior to issuing the plot command. My reading of plotting
> docs
> does not show me what I'm doing incorrectly.
>
>   An example of the command I use is:
>
> plot(s95.z$Se, pin = c(6,2) , main = "Selenium", xlab = "Date", ylab =
> "Concentration")
>
>   A pointer to what I'm missing is needed.
>
>


Try this:

opar <- par(pin = c(5, 2))
plot(zoo(1:3))
par(opar)

or this:

windows(width = 5, height = 2) # or x11
plot(zoo(1:3))
dev.off() # close window



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com




More information about the R-help mailing list