Skip to content
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

Multipanel plots overwrite original frame/grob classes #142

Open
stefaneng opened this issue Jul 21, 2023 · 0 comments
Open

Multipanel plots overwrite original frame/grob classes #142

stefaneng opened this issue Jul 21, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@stefaneng
Copy link
Contributor

Multipanel plots have a class multipanel that overwrites the original classes. This prevents multipanel output from being used in standard grid functions. For example, without manually updated the classes a multipanel plot cannot be used in a multipanel plot.

https://github.com/uclahs-cds/public-R-BoutrosLab-plotting-general/blob/main/R/create.multipanelplot.R#L821C2-L821C30

This line should just add multipanel class to the class vector:

class(x) <- c('multipanel', class(x));

This would also simplify the print function as we can remove the class change:

https://github.com/uclahs-cds/public-R-BoutrosLab-plotting-general/blob/main/R/create.multipanelplot.R#L5-L13

@stefaneng stefaneng added the bug Something isn't working label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant