-
Notifications
You must be signed in to change notification settings - Fork 633
Correcting the order of traces #227
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
Ok, maybe that is too drastic of a change to reverse the order of the traces since a lot of the tests depend on the order of the traces from the old code. Let me think this over. |
After realizing how dumb my initial solution was, I decided to reverse the order of the traces only when there is a problem. Right now the two cases where I have detected a problem include:
So I added the following lines to # reverse the traces in the following cases:
# geom_area
# geom_density with position = stack
if (g$geom == "area" |
g$geom == "density" & l$position$.super$objname == "stack"){
traces <- rev(traces)
} else{
traces
} I also included tests for the two cases that I list above to |
On TravisCI, commit 495ba85 was successfully merged with 6ff8831 (master) to create 5660dda. A visual testing table comparing 6ff8831 with 5660dda can be found here: |
Hit a snag because the dataset for one of the new tests required the package |
On TravisCI, commit 6afd57e was successfully merged with 6ff8831 (master) to create 2c09c51. A visual testing table comparing 6ff8831 with 2c09c51 can be found here: |
On TravisCI, commit a892b5d was successfully merged with 6ff8831 (master) to create e0f0fae. A visual testing table comparing 6ff8831 with e0f0fae can be found here: |
Detected 3 differences -> http://cpsievert.github.io/plotly-test-table/bdcba39/area-traces_order |
^^^ much better than the test table, huh @chriddyp? :) (that jitter test is a false positive, just ignore it, I'll fix it later) |
Detected 3 differences -> http://cpsievert.github.io/plotly-test-table/0696ba9/area-traces_order |
Correcting the order of traces
This is a pull request to address #225 "Ordering of traces is wrong". This seems to be a problem with a lot of geoms. I am attempting a general first-cut solution (pretty drastic try) by reversing the order of the traces. I want to see how it fares in the plotly test tables.
@cpsievert @chriddyp