Skip to content

Support for R grid package in ggplotly #220

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

Closed
jackparmer opened this issue May 14, 2015 · 3 comments
Closed

Support for R grid package in ggplotly #220

jackparmer opened this issue May 14, 2015 · 3 comments

Comments

@jackparmer
Copy link
Contributor

For multiple plots that are laid out in a grid using the R grid package, looks like ggplotly only grabs the first of those plots:

Ie, this:

image

Turns into this with ggplotly:

image

Would be cool if we used Plotly subplots for these.

https://siguniang.wordpress.com/2010/11/21/rviewports-grid-in-ggplot2/

@cpsievert
Copy link
Collaborator

I'm pretty sure translating that code directly isn't possible because of the package design and R internals.

However, we could make it easier to make subplots, which is something I can take into consideration for the redesign. Maybe we could handle a list of ggplots, so something like this:

ps <- list(
  plot1 = qplot(rnorm(100)),
  plot2 = qplot(rnorm(100)),
  layout = list(yaxis = list(domain = c(0, 0.3)))
)
plotly(ps)

@jackparmer
Copy link
Contributor Author

That would be cool!

@cpsievert cpsievert added this to the v1.0 milestone May 30, 2015
@cpsievert cpsievert mentioned this issue Jun 3, 2015
@cpsievert
Copy link
Collaborator

The new subplot() function is aimed at this problem. @jackparmer feel free to open another issue if there is some sort of functionality that you think subplot() should support but doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants