Skip to content

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

Merged
merged 13 commits into from
Mar 24, 2015
Merged

Carson ribbon #193

merged 13 commits into from
Mar 24, 2015

Conversation

cpsievert
Copy link
Collaborator

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 consequently geom_smooth()) will respect fill/colour/group aesthetics.

@cpsievert
Copy link
Collaborator Author

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.

@tdhock
Copy link
Contributor

tdhock commented Mar 19, 2015

looks good to me. did you add any tests for ribbons and facets?

@cpsievert
Copy link
Collaborator Author

No, but good idea. Do you think I should put them in a separate test file?

@tdhock
Copy link
Contributor

tdhock commented Mar 19, 2015

same file is fine with me.

@cpsievert
Copy link
Collaborator Author

Here is a test for facetted smooths --

http://ropensci.github.io/plotly-test-table/tables/aaf302ed8f9fb55b52f90b156425cb9f1124f52e/smooth-facet.html

Unfortunately my attempt to avoid redundant legend entries breaks this plot in a weird way (I'm not sure why) --

http://ropensci.github.io/plotly-test-table/tables/154b7790508a5da192297f191a10e2c94fb337f7/path-line-symbols.html

Does anyone have any other thoughts/opinions on how to best avoid redundant legend entries?

@cpsievert
Copy link
Collaborator Author

@tdhock
Copy link
Contributor

tdhock commented Mar 20, 2015

this plot still has multiple legend entries ... can you add a test for that? and then fix it?

http://ropensci.github.io/plotly-test-table/tables/2e26cc0e393426fd66c5ae47440c4e1657c343ec/smooth-facet.html

@cpsievert
Copy link
Collaborator Author

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.

@cpsievert
Copy link
Collaborator Author

OK, legend entry comparison will now ignore the alpha level, so we get the desired result here --

http://ropensci.github.io/plotly-test-table/tables/a13e92794153452ae16252c6799dba7983462aae/smooth-facet.html

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/

@chriddyp
Copy link
Member

hey sorry just checking in on this. I don't understand why fill/colour/group can't be done with multiple traces and fill?

@chriddyp
Copy link
Member

is it possible to see the json or url for this test? http://ropensci.github.io/plotly-test-table/tables/a13e92794153452ae16252c6799dba7983462aae/smooth-fill2.html
image

is the fill a polygon or a trace?

@tdhock
Copy link
Contributor

tdhock commented Mar 20, 2015

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

@tdhock tdhock mentioned this pull request Mar 20, 2015
@cpsievert
Copy link
Collaborator Author

The test table is slightly broken right now, so let's postpone this until that's fixed. Follow the discussion here

@tdhock
Copy link
Contributor

tdhock commented Mar 23, 2015

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

@cpsievert
Copy link
Collaborator Author

Nice! Thanks @tdhock!

I merged that pull request which makes logs available, so @chriddyp, you can get the url for that example via

http://ropensci.github.io/plotly-test-table/data/ef301b0e7c602b1cb1484f73426ac30dcbf24983/smooth-fill2.log

@cpsievert
Copy link
Collaborator Author

@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)

@tdhock
Copy link
Contributor

tdhock commented Mar 23, 2015

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).

@cpsievert
Copy link
Collaborator Author

Good idea @tdhock. Unfortunately I'm swamped with other stuff this week. This might have to wait until next week.

@chriddyp
Copy link
Member

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! 💃

@cpsievert
Copy link
Collaborator Author

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?

@tdhock
Copy link
Contributor

tdhock commented Mar 24, 2015

fine with me +1

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

Successfully merging this pull request may close these issues.

3 participants