-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: Handle plots with factors by introducing mfrow/facets #12
Conversation
Oh, this is great. A faceting option for groups has been on my to to-do list for a while. The idea that the same infra could be used to tackle factors is a cherry on top. (As an aside, I love the simplicity of the As you say, the ideal functionality would provide a clean aesthetic. I think we can reduce the internal margins ( In summary: I love it this idea and happy to provide more explicit feedback once you hit any deeper design decisions. Thanks for taking the lead @zeileis! |
Great, thanks for the quick feedback, Grant @grantmcdermott! The next question is then how extensively we want to support the faceted case. My current implementation is very lightweight, calling To start with this, I could implement the three other |
I'm all for it. My main concern is that I don't want this project to become an additional burden for you and @vincentarelbundock. I know you are both as busy as I am, so don't want to create a weight of expectation from my side. OTOH I do think think plot2 has the scope to become a useful and widely used package. If you have time and motivation, I 'm very excited/grateful to have these additions. PS. I think increasing modularization is generally a good idea for this project. The current structure is very much a legacy of the original, narrowly defined script that I had lying around. Once we have implemented things like |
* legend defaults to "right!" and bty="n" * Legend catch for non-point plot types * Update README * docs * Re-snapshot old tests * Add tests for README figs * NEWS
* Add density method * Import methods and update Namepsace * Update examples * Add grouped density plot example to README * Add tests * NEWS * Use joint bandwidth * update tests * Add envir
Argh, I tried to merge the 'mfrow' branch with 'main' before continuing but somehow exceeded my git skills (I'm still not very good at this...). So I decided to close this PR and I'll start fresh. Sorry! |
Disclaimer: This is not a finished PR, yet, but just a proof of concept.
Idea: In the case where at least
x
ory
is a factor, it is not easily possible to handleby
within the same panel. So a simple option would be to resort to multiple facets in that case. For now I have named the corresponding argumentmfrow
, following the basepar()
option.Examples:
But also support for factor variables, e.g., for boxplots in one or more facets.
Or even facets of mosaic displays (aka doubledecker plots) if all variables are factors.
To do: Provided you think this is worth pursuing, I would still have to work out how to set all defaults properly and which graphical parameters to pass on in which specification etc.