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 plot return type #172

Open
dan-knight opened this issue Mar 27, 2024 · 2 comments
Open

Multipanel plot return type #172

dan-knight opened this issue Mar 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dan-knight
Copy link
Contributor

dan-knight commented Mar 27, 2024

It seems that create.multipanelplot does not return a plot object if a filename is specified (it just writes the plot to the > file). Is that expected behavior? Also, when an object is returned, it seems to be of class "multipanel" - is that something >that was made up for BPG or is that an actual lattice-related class?

Originally posted by @alkaZeltser in uclahs-cds/package-ApplyPolygenicScore#24 (comment)

Off the top of my head, I don't think this should be the case. It would be inconsistent with the other plotting functions. It's possible that there's some technical limitation specific to multipanel plots, but I'd hope that wouldn't be the case. You can see here that it's returning the grob rather than returning the result of write.plot. This is inconsistent with other plotting functions..

The class name is set here. I think that should be changed to include the other trellis/grid classnames (adding multipanel) rather than setting it to only multipanel.

@dan-knight dan-knight added the bug Something isn't working label Mar 27, 2024
@jarbet
Copy link
Contributor

jarbet commented Mar 29, 2024

I think that should be changed to include the other trellis/grid classnames (adding multipanel) rather than setting it to only multipanel.

Agreed! There is a bug where you can't immediately input a plot made by create.multipanelplot into another create.multipanelplot call.

The temporary solution @stefaneng came up with is to just redefine the class:

class(multipanel.plot) <- c('multipanel', 'frame', 'gTree', 'grob', 'gDesc');

Then the above multipanel.plot can be input into another create.multipanelplot call.

@pboutros
Copy link
Contributor

I have no memory of this either way, but suggest tracing the initial commit history of create.multipanelplot on svn to see if there's anything useful in there

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

4 participants