-
Notifications
You must be signed in to change notification settings - Fork 633
Carson ribbon #193
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
Carson ribbon #193
Conversation
It's worth noting that I haven't (yet) added the invisible errorbars (as suggested by Toby) to aid comparison of upper and lower bounds of ribbons upon hover. If there are multiple groups, that could get quite busy, so my suggestion would be to only draw the invisible errorbars when there is 1 group. Does anyone object to that idea? If not, I'll likely implement that in a separate pull request. |
Note the new tests -- The smoother legends still need a bit of work...hopefully I can fix that tomorrow. |
looks good to me. did you add any tests for ribbons and facets? |
No, but good idea. Do you think I should put them in a separate test file? |
same file is fine with me. |
Here is a test for facetted smooths -- Unfortunately my attempt to avoid redundant legend entries breaks this plot in a weird way (I'm not sure why) -- Does anyone have any other thoughts/opinions on how to best avoid redundant legend entries? |
this plot still has multiple legend entries ... can you add a test for that? and then fix it? |
At first I was thinking that was the correct behavior since the legend entries have different alpha levels; however, the more I think about it, in most cases, the differences in alpha should be ignored (especially if the entry names are the same). Anyway, I'll go ahead and make sure this becomes one legend. |
OK, legend entry comparison will now ignore the alpha level, so we get the desired result here -- The rest of the table looks good to me. Go ahead and merge when ready @tdhock @chriddyp @mkcor http://ropensci.github.io/plotly-test-table/tables/a13e92794153452ae16252c6799dba7983462aae/ |
hey sorry just checking in on this. I don't understand why fill/colour/group can't be done with multiple traces and fill? |
is it possible to see the json or url for this test? http://ropensci.github.io/plotly-test-table/tables/a13e92794153452ae16252c6799dba7983462aae/smooth-fill2.html is the fill a polygon or a trace? |
when we make the test table we write a log file for every download attempt https://github.com/ropensci/plotly-test-table/blob/gh-pages/table.R#L250 for your example there is supposed to be this log file http://ropensci.github.io/plotly-test-table/data/a13e92794153452ae16252c6799dba7983462aae/smooth-fill2.log which should contain the plotly URL but it is not found. why are logs not getting pushed to the plotly-test-table repos? it is because there should be ./git-add.sh in the push-test-table code. this branch already contains that fix https://github.com/ropensci/plotly/pull/174/files |
The test table is slightly broken right now, so let's postpone this until that's fixed. Follow the discussion here |
i fixed the bugs and re-built the test table, voilà http://ropensci.github.io/plotly-test-table/tables/ef301b0e7c602b1cb1484f73426ac30dcbf24983/big.html FYI the rows of the big.html table are now the subset of tests for which there are differences in the md5sum of the png files (between branch and master). so this branch looks good to me +1 |
@chriddyp multiple traces will be generated if the colour/fill aesthetic is specified, but not for group. Do you want multiple traces so that we have more informative tooltips? I think that should be possible...I'm just using the default functionality for polygons (these are actually ribbons -- a special case of a polygon) |
for the interactivity it would be nice if the popup was only displayed for x-values with black dots, so then users could compare the observed data value with the mean data value. that could be achieved if we evaluate the smooth line only on the grid of x-values that are present in the data set (rather than a uniformly spaced grid which I guess is what the code currently does). |
Good idea @tdhock. Unfortunately I'm swamped with other stuff this week. This might have to wait until next week. |
oh, nvm, when you guys were saying "basic polygon" I thought you meant Plotly's new basic polygon shapes (https://plot.ly/~etpinard/1647/plotly-shapes/). This looks great to me, let's ship this version, nice work! 💃 |
Great, I'm keen on merging this since it's such a big bug fix. We can work out the details of comparison mode in another pull request. Are you OK with that @tdhock? |
fine with me +1 |
This pull request re-implements ribbon as a basic polygon (in a similar fashion to rect).
One major benefit of doing so is that
geom_ribbon()
(and consequentlygeom_smooth()
) will respect fill/colour/group aesthetics.