Re: [R] Multiple histograms in one plot

2006-10-18 Thread David Barron
I suspect that mar doesn't work with split.screen.  You could try
using mfrow instead:

 par(mar=c(1,1,1,1),mfrow=c(5,4))
 for (i in 1:20) hist(rnorm(100),main=,cex.axis=.8)

With margins this small, though, you won't be able to see the axis
annotation for the left axes of the left column or the bottom axis of
the bottom row.

On 18/10/06, Johann Hibschman [EMAIL PROTECTED] wrote:
 Hi all,

 I'm trying to plot multiple histograms in one plot (cross-validation
 values of model parameters), but I cannot seem to reduce the margins
 enough to fit as many of them in as I would like.

 I'm using split.screen to divide the window into a 5x4 grid, then
 plotting with hist.  I've tried explicitly reducing the margins with
 par(mar=c(1,1,1,1)), but it doesn't seem to have any effect.
 Visually, there is a lot of whitespace and very little histogram in my
 results.

 Can anyone suggest either a better method to visualize these results,
 a better way to plot histograms, or a way to actually reduce the
 margins used?  The intent is to give a sense of how well-constrained
 the various model parameters are.

 Thanks,

 Johann

 __
 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
 and provide commented, minimal, self-contained, reproducible code.



-- 
=
David Barron
Said Business School
University of Oxford
Park End Street
Oxford OX1 1HP

__
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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Multiple histograms in one plot

2006-10-18 Thread Stefan Grosse
Have a look at the lattice package. It is the best choice for such a
task imho.


Johann Hibschman schrieb:
 Hi all,

 I'm trying to plot multiple histograms in one plot (cross-validation
 values of model parameters), but I cannot seem to reduce the margins
 enough to fit as many of them in as I would like.

 I'm using split.screen to divide the window into a 5x4 grid, then
 plotting with hist.  I've tried explicitly reducing the margins with
 par(mar=c(1,1,1,1)), but it doesn't seem to have any effect.
 Visually, there is a lot of whitespace and very little histogram in my
 results.

 Can anyone suggest either a better method to visualize these results,
 a better way to plot histograms, or a way to actually reduce the
 margins used?  The intent is to give a sense of how well-constrained
 the various model parameters are.

 Thanks,

 Johann

 __
 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
 and provide commented, minimal, self-contained, reproducible code.




__
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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Multiple histograms in one plot

2006-10-18 Thread Johann Hibschman
Thanks, that works well.  Using layout also works.  I suppose I
should have experimented with those earlier, but I somehow got it into
my head that split.screen was the modern and correct way to handle
this.

The lattice package is nice, but it isn't useful to me, since each
histogram has a very different mean and standard deviation, so the
uniform treatment that is the lattice default does not work well.
(Presumably, there is a way around this.  Since layout/mfrow works for
me, I am not motivated to seek it.)

Cheers,

Johann

On 10/18/06, David Barron [EMAIL PROTECTED] wrote:
 I suspect that mar doesn't work with split.screen.  You could try
 using mfrow instead:

  par(mar=c(1,1,1,1),mfrow=c(5,4))
  for (i in 1:20) hist(rnorm(100),main=,cex.axis=.8)

 With margins this small, though, you won't be able to see the axis
 annotation for the left axes of the left column or the bottom axis of
 the bottom row.

 On 18/10/06, Johann Hibschman [EMAIL PROTECTED] wrote:
  Hi all,
 
  I'm trying to plot multiple histograms in one plot (cross-validation
  values of model parameters), but I cannot seem to reduce the margins
  enough to fit as many of them in as I would like.
 
  I'm using split.screen to divide the window into a 5x4 grid, then
  plotting with hist.  I've tried explicitly reducing the margins with
  par(mar=c(1,1,1,1)), but it doesn't seem to have any effect.
  Visually, there is a lot of whitespace and very little histogram in my
  results.
 
  Can anyone suggest either a better method to visualize these results,
  a better way to plot histograms, or a way to actually reduce the
  margins used?  The intent is to give a sense of how well-constrained
  the various model parameters are.
 
  Thanks,
 
  Johann
 
  __
  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
  and provide commented, minimal, self-contained, reproducible code.
 


 --
 =
 David Barron
 Said Business School
 University of Oxford
 Park End Street
 Oxford OX1 1HP


__
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
and provide commented, minimal, self-contained, reproducible code.


[R] Multiple histograms in one plot

2006-10-17 Thread Johann Hibschman
Hi all,

I'm trying to plot multiple histograms in one plot (cross-validation
values of model parameters), but I cannot seem to reduce the margins
enough to fit as many of them in as I would like.

I'm using split.screen to divide the window into a 5x4 grid, then
plotting with hist.  I've tried explicitly reducing the margins with
par(mar=c(1,1,1,1)), but it doesn't seem to have any effect.
Visually, there is a lot of whitespace and very little histogram in my
results.

Can anyone suggest either a better method to visualize these results,
a better way to plot histograms, or a way to actually reduce the
margins used?  The intent is to give a sense of how well-constrained
the various model parameters are.

Thanks,

Johann

__
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
and provide commented, minimal, self-contained, reproducible code.