[R] About plot graphs

Stephen Liu satimis at yahoo.com
Fri Aug 27 04:01:33 CEST 2010


Hi Greg,

Thanks for your advice.

I'm not prepared altering the shape of the graphs to be plotted.  What I'm 
trying to do is to pop up a rectangle layout window with following command.

The command;
layout(matrix(1:2, nrow=1))

pop up a square window.  What I need is a rectangular window for the graphs to 
be plotted.  Otherwise the graphs are squeezed changing shape.

I looked at ?layout but can't resolve how to make it.  Can you help?  TIA

B.R.
Stephen L




----- Original Message ----
From: Greg Snow <Greg.Snow at imail.org>
To: Stephen Liu <satimis at yahoo.com>; "r-help at r-project.org" 
<r-help at r-project.org>
Sent: Fri, August 27, 2010 9:00:01 AM
Subject: RE: [R] About plot graphs

There is a graphical parameter that controls whether a plot is square or takes 
up the maximum amount of room (rectangle), see ?par and look at the entry for 
pty. 


It is possible that you set pty='s' or it may be that the plot method sets it, 
without us knowing what type of object Date and Test01$Date are we don't know 
which method is creating your plot and cannot be much more help (that is meant 
as a subtle hint to provide the information requested in the footer of every 
post and the posting guide).

Some methods may set pty='s' as default but have an option to change it.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Stephen Liu
> Sent: Thursday, August 26, 2010 8:45 AM
> To: r-help at r-project.org
> Subject: [R] About plot graphs
> 
> Hi folks,
> 
> Following command prints 2 graphs side-by-side:-
> layout(matrix(1:2, nrow=1))
> plot(Date,Input_No.)
> plot(Test01$Date, Test01$Input_No.)
> 
> However each is a square graph I need a rectangular layout.  Pls advise
> how to
> make it.  TIA
> 
> B.R.
> satimis
> 
> 
> 
> 
> ______________________________________________
> 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