factor level with 0 counts does not show up correctly
Closed this issue · 4 comments
I have the same issue :(
It's ok when I set the offset to zero...
EDITED: Quick fix in my fork, in the divider file (last two commits)
Does the job on my case, haven't tested everything...
Plus I still feel we "see" a fine line of colors for theses 0 weight lines... removing offsets might not be the way to go...
This is not a bug, it is a feature. The fine line is an indicator to which of the cell combinations is zero. Otherwise there is visually no way to distinguish between zero kids in the crew and any of the other factors.
I would agree if the initial data.frame has zeros in it, but since at some point the code is expanding all case it add zeros which were not present.
Maybe it could be added as an option somewhere?
It is tricky to talk about the 'initial data.frame' in the context of a mosaic plot. Mosaic plots are a rendering of a contingency tables. Those do have zeroes, and it is informative to know where these zeroes are.
As an option to not show the space, you can always go to offset = 0.
Anything else will affect the validity of the representation.