For some reason I cannot get xlab and ylab to work in mosaic plots in vcd package.
I tried:
mosaic(~Sex +Survived,
data=Titanic,
shade=T,
legend=T,
main="myplot",
labeling_args=list(abbreviate = c( Sex=2, Survived=1)) ,
ylab="Gender",
xlab="survival")
this labels the axes "Sex" and "Survived" respectively.
mosaic(margin.table(Titanic, c(2,4)),
ylab="Gender",
xlab="survival",
shade=T, legend=T,
main="myplot",
labeling_args=list(abbreviate = c( Sex=2, Survived=1)))
this also labels the axes "Sex" and "Survived" respectively.
mosaicplot(margin.table(Titanic, c(2,4)),
shade=T,
legend=T,
main="myplot",
labeling_args=list(abbreviate = c(Sex=2, Survived=1)),
ylab="Gender",
xlab="survival")
this labels the axes correctly, but disregards ‘labeling_args’
Does anyone have any suggestions?