[R] How to make two figures in one plot - package vcd
Muhammad Subianto
subianto at gmail.com
Fri Sep 16 19:32:30 CEST 2005
On this day 16/09/2005 05:59 PM, Dieter Menne wrote:
> Muhammad Subianto <subianto <at> gmail.com> writes:
>
>
>>I have a problem to make figures with two columns in package vcd.
>>Here an example code I take from "\library\vcd\html\plot.loglm.html"
>>What I need, I want to make two figures in one plot.
>>
>>library(vcd)
>>oldpar <- par(mfrow=c(1, 2))
>>## mosaic display for PreSex model
>>data(PreSex)
>>fm <- loglm(~ PremaritalSex * ExtramaritalSex * (Gender + MaritalStatus),
>> data = aperm(PreSex, c(3, 2, 4, 1)))
>>## visualize Pearson statistic
>>plot(fm, split_vertical = TRUE)
>>## visualize LR statistic
>>plot(fm, split_vertical = TRUE, residuals_type = "deviance")
>>par(oldpar)
>
> ..
>
> The example worked in the previous version, but David Meyer has rewritten the
> whole package using grid functions. Figures are much nicer now, but
> documentations is a bit on the sparse side. I don't have the docs at hand
> currently, but I believe you should looks at strucplot to set the layout there,
> or use grid directly.
>
Thanks you for your respon.
Yes, I know this a new version vcd (mosaic->vcd <> mosaicplot->core,base
R). This version is look very nice. I am very happy to use this version.
I have tried to look at documentations like
"\library\vcd\html\strucplot.html" I have used "newpage=FALSE" but it
didn't change.
I will try to look at grid package.
> Greetings from an Ex-Cirebonese
>
> Dieter
Best, Muhammad Subianto
PS.
Ex-Cirebonese? Ha ha ha ... I know this ...
http://en.wikipedia.org/wiki/Cirebon
how about this http://en.wikipedia.org/wiki/Banda_Aceh
More information about the R-help
mailing list