Displaying 1 result from an estimated 1 matches for "obsnorm".
Did you mean:
snorm
2008 May 31
2
How to add space between main title to leave space for legend?
...in some space after the title.
Here's working example where I'd like to make room for a legend.
x <- rnorm(100)
hist(x, freq=F, main="Different Meanings of Normality")
lines(density(x))
xseq1 <- seq( min(x), max(x), length.out=100)
m1 <- mean(x)
sd1 <- sd(x)
obsNormal <- dnorm(xseq1, mean=m1, sd=sd1)
lines( xseq1, obsNormal, lty=2, col="red")
truNormal <- dnorm(xseq1)
lines(xseq1, truNormal, lty=3, col="green")
legend(0,0.4, legend=c("observed density", "normal with observed mean
& sd", "normal with ...