One approach is to use the subplot function from the TeachingDemos
package. I could only get everything to line up properly if I specified
the xlim argument to hist directly and the same value as the ylim
argument to boxplot.
Try this:
x - rnorm(100)
library(TeachingDemos)
hist(x, breaks =
Charilaos == Charilaos Skiadas [EMAIL PROTECTED]
on Sat, 13 Jan 2007 23:12:00 -0500 writes:
Charilaos I am trying to add a boxplot to the bottom of a
Charilaos histogram, right between the histogram bars and
Charilaos the x axis. Here is the code I am using at the
Charilaos
Charilaos Skiadas wrote:
Greetings,
I am trying to add a boxplot to the bottom of a histogram, right
between the histogram bars and the x axis. Here is the code I am
using at the moment (the par line is probably not relevant for our
discussion):
hs - hist(x, breaks = 20, plot
Sorry, meant to send this to the list.
On Jan 14, 2007, at 4:28 PM, Charilaos Skiadas wrote:
On Jan 14, 2007, at 5:50 AM, Chuck Cleland wrote:
Try setting the boxwex argument instead:
Thanks Chuck, that does indeed seem to work pretty well. I'm not
quite sure what the best way to
Greetings,
I am trying to add a boxplot to the bottom of a histogram, right
between the histogram bars and the x axis. Here is the code I am
using at the moment (the par line is probably not relevant for our
discussion):
hs - hist(x, breaks = 20, plot = F)
par(mar = c(3,3,2,1))