Re: [R] Multiple lag.plots per page

2006-06-14 Thread Gad Abraham
Prof Brian Ripley wrote:
 On Wed, 14 Jun 2006, Gad Abraham wrote:
 
 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:

 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:

 Hi,

 I'm trying to plot several lag.plots on a page, however the second 
 plot
 replaces the first one (although it only takes up the upper half 
 as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?

 lag.plot itself calls par(mfrow).  The trick is to get one call to 
 do the plots you want:

 lag.plot(cbind(a,b))



 Thanks, that works great for multiple lag.plots. Is it possible to 
 have a lag.plot and another type of plot on the same page? The 
 second plot() always replaces the lag.plot for me.

 Yes, if the other plot is second, e.g

 par(mfrow=c(2,1))
 a-sin(1:100)
 lag.plot(a)
 par(mfg=c(2,1)) # move to second plot
 plot(1:10)



 Following from my previous questions, lag.plot doesn't recognise some 
 of the standard plot variables, e.g. xaxt=n doesn't remove the 
 x-axis, and setting xlab causes an error:

 lag.plot(sin(1:100), xlab=foo)
 Error in plotts(x = x, y = y, plot.type = plot.type, xy.labels = 
 xy.labels, :
formal argument xlab matched by multiple actual arguments

 Is this a bug or a feature?
 
 feature.  Note that the help page says
 
  ...: Further arguments to 'plot.ts'.
 
 and not `graphical parameters'.
 
 
 Also, how can I make lag.plot behave nicely when plotted with other 
 plots on the same page? it takes up more room than it's allocated by 
 par(mfrow).
 
 Really you are not using it for its intended purpose, multiple plots at 
 different lags.  (Notice the plurals in the title and the description on 
 the help page.)  Why not use plot.ts directly?
 
 If you want to pursue lag.plot, try the version in R-devel which works 
 better for single-plot displays.
 

OK, I've experimented with plot.ts and it does what I need it to.

Thanks for your help,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Gad Abraham
No No wrote:
 Does this help?
   pdf(file=lag.pdf)
   lag.plot(a)
   lag.plot(b)
   dev.off()
 After that you can open each page of the lag.pdf file with GIMP for 
 further manipulation. It gives each plot on a different page, but no 
 plot is replaced.

That would be a last resort, but obviously it's not very practical if 
you have more than a handful of plots.

Thanks,
Gad

 
 2006/6/13, Gad Abraham [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED]:
 
 Hi,
 
 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):
 
 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)
 
 What's the trick to this?
 
 I'm using R 2.2.1 (2005-12-20 r36812) on Ubuntu Linux.
 


-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Prof Brian Ripley
On Tue, 13 Jun 2006, Gad Abraham wrote:

 Hi,

 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?

lag.plot itself calls par(mfrow).  The trick is to get one call to do the 
plots you want:

lag.plot(cbind(a,b))


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Gad Abraham
Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:
 
 Hi,

 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?
 
 lag.plot itself calls par(mfrow).  The trick is to get one call to do 
 the plots you want:
 
 lag.plot(cbind(a,b))
 
 

Thanks, that works great for multiple lag.plots. Is it possible to have 
a lag.plot and another type of plot on the same page? The second plot() 
always replaces the lag.plot for me.

Cheers,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Prof Brian Ripley
On Tue, 13 Jun 2006, Gad Abraham wrote:

 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:
 
 Hi,
 
 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):
 
 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)
 
 What's the trick to this?
 
 lag.plot itself calls par(mfrow).  The trick is to get one call to do the 
 plots you want:
 
 lag.plot(cbind(a,b))
 
 

 Thanks, that works great for multiple lag.plots. Is it possible to have a 
 lag.plot and another type of plot on the same page? The second plot() always 
 replaces the lag.plot for me.

Yes, if the other plot is second, e.g

par(mfrow=c(2,1))
a-sin(1:100)
lag.plot(a)
par(mfg=c(2,1)) # move to second plot
plot(1:10)


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Gad Abraham
Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:
 
 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:

 Hi,

 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?

 lag.plot itself calls par(mfrow).  The trick is to get one call to do 
 the plots you want:

 lag.plot(cbind(a,b))



 Thanks, that works great for multiple lag.plots. Is it possible to 
 have a lag.plot and another type of plot on the same page? The second 
 plot() always replaces the lag.plot for me.
 
 Yes, if the other plot is second, e.g
 
 par(mfrow=c(2,1))
 a-sin(1:100)
 lag.plot(a)
 par(mfg=c(2,1)) # move to second plot
 plot(1:10)
 
 

Thanks, works great.

Cheers,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Gad Abraham
Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:
 
 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:

 Hi,

 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?

 lag.plot itself calls par(mfrow).  The trick is to get one call to do 
 the plots you want:

 lag.plot(cbind(a,b))



 Thanks, that works great for multiple lag.plots. Is it possible to 
 have a lag.plot and another type of plot on the same page? The second 
 plot() always replaces the lag.plot for me.
 
 Yes, if the other plot is second, e.g
 
 par(mfrow=c(2,1))
 a-sin(1:100)
 lag.plot(a)
 par(mfg=c(2,1)) # move to second plot
 plot(1:10)
 
 

Following from my previous questions, lag.plot doesn't recognise some of 
the standard plot variables, e.g. xaxt=n doesn't remove the x-axis, 
and setting xlab causes an error:

  lag.plot(sin(1:100), xlab=foo)
Error in plotts(x = x, y = y, plot.type = plot.type, xy.labels = 
xy.labels,  :
 formal argument xlab matched by multiple actual arguments

Is this a bug or a feature?

Also, how can I make lag.plot behave nicely when plotted with other 
plots on the same page? it takes up more room than it's allocated by 
par(mfrow).


Thanks for your help,
Gad

-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-13 Thread Prof Brian Ripley
On Wed, 14 Jun 2006, Gad Abraham wrote:

 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:
 
 Prof Brian Ripley wrote:
 On Tue, 13 Jun 2006, Gad Abraham wrote:
 
 Hi,
 
 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):
 
 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)
 
 What's the trick to this?
 
 lag.plot itself calls par(mfrow).  The trick is to get one call to do the 
 plots you want:
 
 lag.plot(cbind(a,b))
 
 
 
 Thanks, that works great for multiple lag.plots. Is it possible to have a 
 lag.plot and another type of plot on the same page? The second plot() 
 always replaces the lag.plot for me.
 
 Yes, if the other plot is second, e.g
 
 par(mfrow=c(2,1))
 a-sin(1:100)
 lag.plot(a)
 par(mfg=c(2,1)) # move to second plot
 plot(1:10)
 
 

 Following from my previous questions, lag.plot doesn't recognise some of the 
 standard plot variables, e.g. xaxt=n doesn't remove the x-axis, and setting 
 xlab causes an error:

 lag.plot(sin(1:100), xlab=foo)
 Error in plotts(x = x, y = y, plot.type = plot.type, xy.labels = xy.labels, 
 :
formal argument xlab matched by multiple actual arguments

 Is this a bug or a feature?

feature.  Note that the help page says

  ...: Further arguments to 'plot.ts'.

and not `graphical parameters'.


 Also, how can I make lag.plot behave nicely when plotted with other plots on 
 the same page? it takes up more room than it's allocated by par(mfrow).

Really you are not using it for its intended purpose, multiple plots at 
different lags.  (Notice the plurals in the title and the description 
on the help page.)  Why not use plot.ts directly?

If you want to pursue lag.plot, try the version in R-devel which works 
better for single-plot displays.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +44 1865 272595

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Multiple lag.plots per page

2006-06-12 Thread Gad Abraham
Hi,

I'm trying to plot several lag.plots on a page, however the second plot 
replaces the first one (although it only takes up the upper half as it 
should):

par(mfrow=c(2,1))
a-sin(1:100)
b-cos(1:100)
lag.plot(a)
lag.plot(b)

What's the trick to this?

I'm using R 2.2.1 (2005-12-20 r36812) on Ubuntu Linux.

Thanks,
Gad


-- 
Gad Abraham
Department of Mathematics and Statistics
University of Melbourne
Victoria 3010, Australia
email: [EMAIL PROTECTED]
web: http://www.ms.unimelb.edu.au/~gabraham

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-12 Thread No No
Does this help?
 pdf(file=lag.pdf)
 lag.plot(a)
 lag.plot(b)
 dev.off()
After that you can open each page of the lag.pdf file with GIMP for
further manipulation. It gives each plot on a different page, but no plot is
replaced.

Hope it helps


2006/6/13, Gad Abraham [EMAIL PROTECTED]:

 Hi,

 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?

 I'm using R 2.2.1 (2005-12-20 r36812) on Ubuntu Linux.

 Thanks,
 Gad


 --
 Gad Abraham
 Department of Mathematics and Statistics
 University of Melbourne
 Victoria 3010, Australia
 email: [EMAIL PROTECTED]
 web: http://www.ms.unimelb.edu.au/~gabraham

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Multiple lag.plots per page

2006-06-12 Thread No No
Does this help?
 pdf(file=lag.pdf)
 lag.plot(a)
 lag.plot(b)
 dev.off()
After that you can open each page of the lag.pdf file with GIMP for
further manipulation. It gives each plot on a different page, but no plot is
replaced.

2006/6/13, Gad Abraham [EMAIL PROTECTED]:

 Hi,

 I'm trying to plot several lag.plots on a page, however the second plot
 replaces the first one (although it only takes up the upper half as it
 should):

 par(mfrow=c(2,1))
 a-sin(1:100)
 b-cos(1:100)
 lag.plot(a)
 lag.plot(b)

 What's the trick to this?

 I'm using R 2.2.1 (2005-12-20 r36812) on Ubuntu Linux.

 Thanks,
 Gad


 --
 Gad Abraham
 Department of Mathematics and Statistics
 University of Melbourne
 Victoria 3010, Australia
 email: [EMAIL PROTECTED]
 web: http://www.ms.unimelb.edu.au/~gabraham
 http://www.ms.unimelb.edu.au/%7Egabraham

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html