-
Notifications
You must be signed in to change notification settings - Fork 634
Added support for ggplot2's facets. #44
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
Conversation
Hello Xavier, it looks like you have written some nice code. However I put together a test case in tests/testthat/test-facets.R and it there seem to be a couple of problems:
any ideas? |
also it results in this plotly https://plot.ly/~tdhock/177/1932-1932-1932-1932-1932-1932-1931-1931-1931-1931-1931-1931/ |
Hi Toby, I saw your test code but I haven't run it yet; I'll do that in a moment. Chers, Xavier On Wed, May 28, 2014 at 2:37 PM, Toby Dylan Hocking <
|
Can you clarify what you mean by "some panels may have no data?" In ggplot2, there is no such thing as a facet/panel with no data. The only In the example I gave, all 6 panels do have data, so adding additional On Wed, May 28, 2014 at 3:19 PM, xsaintmleux [email protected]:
|
Ouch! this is a good test... I still have some work to do! So, the 18 traces are because of the six extra empty traces, which is On Wed, May 28, 2014 at 3:18 PM, Xavier Saint-Mleux [email protected] wrote:
|
This is what I mean: https://plot.ly/~xsaintmleux/211 On Wed, May 28, 2014 at 3:40 PM, Xavier Saint-Mleux [email protected] wrote:
|
OK, I see what it is: I just didn't add support for factors on the x/y On Wed, May 28, 2014 at 3:42 PM, Xavier Saint-Mleux [email protected] wrote:
|
that is very nice xav. good job! you are right. it is possible to have empty facets/panels with facet_grid. so what is the difference between a panel with no data (grey background) On Wed, May 28, 2014 at 3:51 PM, xsaintmleux [email protected]:
|
for me the plot would be easier to read if we do not draw the grey otherwise I find myself squinting at the blank grey panels trying to look On Wed, May 28, 2014 at 3:58 PM, Toby Hocking [email protected] wrote:
|
Not displaying the background could make sense, but I was trying to display On Wed, May 28, 2014 at 4:01 PM, Toby Dylan Hocking <
|
It's getting better: On Wed, May 28, 2014 at 4:27 PM, Xavier Saint-Mleux [email protected] wrote:
|
Hey Toby and Marianne, I'm digging into ggplot_build because it sorts the data by panel, which
adds an unsorted column to a sorted data.frame. I'd like to use merge to Thanks, Xavier On Wed, May 28, 2014 at 5:56 PM, Xavier Saint-Mleux [email protected] wrote:
|
one idea is to add some aesthetics before building the ggplot -- I dod that https://github.com/ropensci/plotly/blob/master/R/ggplotly.R#L226 On Thu, May 29, 2014 at 2:59 PM, xsaintmleux [email protected]
|
by the way the merge function can be slow for large data, so maybe it is a On Thu, May 29, 2014 at 3:03 PM, Toby Hocking [email protected] wrote:
|
I'd have to use match to get the index I need for vector operations and BTW, the way you save/use the aesthetics is what needs to be fixed to On Thu, May 29, 2014 at 3:04 PM, Toby Dylan Hocking <
|
by the way my GSOC student Carson Sievert is working on converting ggplot2 facets to animint panels, and he put together this viz to better understand the internal structure of the ggplot object |
I'll take a look at that, thanks! I misunderstood you the other day: now I see what you meant when talking On Mon, Jun 2, 2014 at 8:56 AM, Toby Dylan Hocking <[email protected]
|
@mkcor which line? |
+1 |
Added support for ggplot2's facets.
Please review...