[R] Titles in plots overlap

David Winsemius dwinsemius at comcast.net
Wed Nov 25 01:13:11 CET 2009


I did not get anything very interesting with that plot but  
nonetheless, I suspect that you want to put your  oma= parameter a bit  
earlier.

On Nov 24, 2009, at 6:14 PM, Roslina Zakaria wrote:

> Hi,
>
> I use fCopulae package to draw different graphs of univariate and  
> bivariate skew t.  But the plots titles overlap.  I tried using  
> cex.main, font.main to adjust the size but they still overlaps.   
> Here is my code:

#revised
opar <- par(mfrow = c(3, 1), oma=c(2,2,3,2) )
mu = 0
Omega = 1
alpha1 = 0
alpha2 = 1.5
alpha3 = 2
alpha4 = 0.5
Z1 = matrix(dmvst(x, 1, mu, Omega, alpha1, df = Inf), length(x))
Z2 = matrix(dmvst(x, 1, mu, Omega, alpha2, df = 5), length(x))
Z3 = matrix(dmvst(x, 1, mu, Omega, alpha3, df = 5), length(x))
Z4 = matrix(dmvst(x, 1, mu, Omega, alpha4, df = Inf), length(x))
plot(x,Z1, ylim=range(Z1,Z2), type='l')
points(x,Z2,type='l',col=2)
title(main = "Z1 (Skew=0, df=Inf) vs Z2 (Skew=1.5, df=5)",cex = 1.0)
plot(x,Z1, ylim=range(Z1,Z3), type='l')
points(x,Z3,type='l',col=3)
title(main = "Z1 (Skew=0, df=Inf) vs Z3 (Skew=2, df=5)",cex = 1.0)
plot(x,Z1, ylim=range(Z1,Z4), type='l')
points(x,Z4,type='l',col=4)
title(main = "Z1 (Skew=0, df=Inf) vs Z4 (Skew=0.5, df=Inf)",cex = 1.0)
#deleted
title("Different shapes of univariate skew-t distribution", outer =  
TRUE, cex.main=2)
#added
par(opar)-

-

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list