You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if there's any plans to also support base R mosaic plots? I know that spineplots are currently available, but mosaic plots can also be nice.
Thanks for the suggestion. Which other mosaic features did you think about here? Other splitting orders and/or directions - or residual-based shadings? Maybe you can provide an example of a plot you would like to be able to generate along with the tinyplot(...) syntax that you would find intuitive for it.
The simplest might be to just copy the way type_spineplot does things and pass it to mosaicplot. I think this should work?
Beyond that, it's been a bit too long since I last used mosaic plots intensively to answer your other questions, but I'll try to ask around. It'd be nice to do the same things as mosaic as in the vcd and vcdExtra with a uniform syntax and without loading those other packages, but it seems like mosaic also has quite a long list of potential arguments, so this seems like it'll require more thinking.
Exactly, this is the reason why I'm asking. Incorporating all functionality from mosaic() into tinyplot() would be a bit much.
Calling mosaicplot() inside tinyplot() would only work for a two-way table - but then it would have little additional merit beyond type_spineplot(), except maybe residual-based shadings. The interesting cases would be higher-order tables, though, and I don't have a good idea how to put these into tinyplot().
The one thing that still is on my to-do list, though, is incorporating by variables (beyond the facet = "by" case). I think this would already provide some support for mosaic-style graphics.
I wasn't aware of type_spineplot, but it looks interesting. The one thing I'd wish for most for this and for a possible type_mosaic would be residual-based shading. It was disappointing that ggmosaic doesn't handle this.
For nway > 2 dimensions, faceting seems like a reasonable compromise.
Oh, and still on my list for vcd is to have a way to draw points in the cells, whose number is ~ observed or expected frequency.
Thanks for your Feedback, Michael @friendly, very useful!
The thing that I'm concerned about is that faceted spine plots are always geared towards exploring conditional independence of y and x given facet/by. So I feel it would be inappropriate to employ other independence models for which other types of mosaic arrangements would be more natural.
Drawing additional elements in mosaic plots is also a good point. I think for vcd we should have an example somewhere. For spineplot() in base R we had discussed whether the returned table should have an attribute or something similar to persp which does the coordinate transformations. However, we never could decide on a good and easy-to-use interface for this. With the faceting in tinyplot this does not become easier. I do not have an idea for a good solution here.
Activity
zeileis commentedon May 11, 2025
Thanks for the suggestion. Which other mosaic features did you think about here? Other splitting orders and/or directions - or residual-based shadings? Maybe you can provide an example of a plot you would like to be able to generate along with the
tinyplot(...)syntax that you would find intuitive for it.emstruong commentedon May 11, 2025
I think there's a couple approaches.
The simplest might be to just copy the way
type_spineplotdoes things and pass it tomosaicplot. I think this should work?Beyond that, it's been a bit too long since I last used mosaic plots intensively to answer your other questions, but I'll try to ask around. It'd be nice to do the same things as
mosaicas in thevcdandvcdExtrawith a uniform syntax and without loading those other packages, but it seems likemosaicalso has quite a long list of potential arguments, so this seems like it'll require more thinking.zeileis commentedon May 11, 2025
Exactly, this is the reason why I'm asking. Incorporating all functionality from
mosaic()intotinyplot()would be a bit much.Calling
mosaicplot()insidetinyplot()would only work for a two-way table - but then it would have little additional merit beyondtype_spineplot(), except maybe residual-based shadings. The interesting cases would be higher-order tables, though, and I don't have a good idea how to put these intotinyplot().The one thing that still is on my to-do list, though, is incorporating
byvariables (beyond thefacet = "by"case). I think this would already provide some support for mosaic-style graphics.friendly commentedon May 11, 2025
I wasn't aware of
type_spineplot, but it looks interesting. The one thing I'd wish for most for this and for a possibletype_mosaicwould be residual-based shading. It was disappointing thatggmosaicdoesn't handle this.For
nway > 2dimensions, faceting seems like a reasonable compromise.Oh, and still on my list for
vcdis to have a way to draw points in the cells, whose number is ~ observed or expected frequency.zeileis commentedon May 14, 2025
Thanks for your Feedback, Michael @friendly, very useful!
The thing that I'm concerned about is that faceted spine plots are always geared towards exploring conditional independence of
yandxgivenfacet/by. So I feel it would be inappropriate to employ other independence models for which other types of mosaic arrangements would be more natural.Drawing additional elements in mosaic plots is also a good point. I think for
vcdwe should have an example somewhere. Forspineplot()in base R we had discussed whether the returned table should have an attribute or something similar toperspwhich does the coordinate transformations. However, we never could decide on a good and easy-to-use interface for this. With the faceting intinyplotthis does not become easier. I do not have an idea for a good solution here.grantmcdermott commentedon Aug 18, 2026
Solely for paper trail: @zeileis expands on the
by->mosaictype idea here: #660