Skip to content

Added legends for boxplots and densities #230

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 12 commits into from
Dec 13, 2015
Merged

Conversation

13bzhang
Copy link
Contributor

This a solution to Issue #212. The legends weren't showing up for boxplots and density plots is because those features were not part of markLegends in ggplotly. I added them. I also made an except for boxplot so that is takes markSplit instead. Finally, I added a test for boxplots where each box-and-whiskers has a different fill. Will add to the existing density plot tests tomorrow to check for legends.

Now we can enjoy legends:

boxplot_plotly_fixed

density_carson_fixed

@cpsievert @mkcor @chriddyp

@13bzhang
Copy link
Contributor Author

@cpsievert Hey Carson, do you know my graphs are not showing up the in the test tables?

@cpsievert
Copy link
Collaborator

Ugh, I just spent a couple hours trying to debug. For some reason the pngs aren't being pushed appropriately, but not sure why.

The current logic of the test table is super complicated, so if anything goes wrong, it's hard to fix it (this is a big reason why I'm changing the test table infrastructure in #226). I think my time is better spent finishing that new infrastructure.

@mkcor @chriddyp

@13bzhang
Copy link
Contributor Author

Thanks for checking it out!

@cpsievert
Copy link
Collaborator

The message below was automatically generated after build https://travis-ci.org/ropensci/plotly/builds/96356423

Detected 42 differences ->

http://cpsievert.github.io/plotly-test-table/e078fca/boxplot
http://cpsievert.github.io/plotly-test-table/e078fca/boxplot-datetime
http://cpsievert.github.io/plotly-test-table/e078fca/boxplot-legends_for_fill
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-blank-minor
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-blank-minor-major
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-blank-x
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-blank-y
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-coord-ylim
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-custom-formatter
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-flevels
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-fonts
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-label-funs
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-no-x-title
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-scale.hide
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-scale-name
http://cpsievert.github.io/plotly-test-table/e078fca/cookbook-axes-ylim.hide
http://cpsievert.github.io/plotly-test-table/e078fca/density-color
http://cpsievert.github.io/plotly-test-table/e078fca/density-fill
http://cpsievert.github.io/plotly-test-table/e078fca/density-traces_order
http://cpsievert.github.io/plotly-test-table/e078fca/scatterplots-jitter
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-boxes
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-boxes-facet-grid
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-boxes-scales-free
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-boxes-space-free
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-breaks-less
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-breaks-more
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-breaks-nochange
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-discrete-order
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-evenly-spaced-ticks
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-flip
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-hide-ticks-labels
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-hide-ticks-lines-labels
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-hide-y
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-hide-y-keep-grid
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-limits-gap
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-limits-hide
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-scale-labels
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-ycontinuous-ranges
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-ylim-ranges
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-ylim-reversed-ranges
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-yreverse-limits-ranges
http://cpsievert.github.io/plotly-test-table/e078fca/ticks-yreverse-ranges

@cpsievert
Copy link
Collaborator

The message below was automatically generated after build https://travis-ci.org/ropensci/plotly/builds/96371066

Detected 42 differences ->

http://cpsievert.github.io/plotly-test-table/260b9c9/boxplot
http://cpsievert.github.io/plotly-test-table/260b9c9/boxplot-datetime
http://cpsievert.github.io/plotly-test-table/260b9c9/boxplot-legends_for_fill
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-blank-minor
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-blank-minor-major
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-blank-x
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-blank-y
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-coord-ylim
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-custom-formatter
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-flevels
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-fonts
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-label-funs
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-no-x-title
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-scale.hide
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-scale-name
http://cpsievert.github.io/plotly-test-table/260b9c9/cookbook-axes-ylim.hide
http://cpsievert.github.io/plotly-test-table/260b9c9/density-color
http://cpsievert.github.io/plotly-test-table/260b9c9/density-fill
http://cpsievert.github.io/plotly-test-table/260b9c9/density-traces_order
http://cpsievert.github.io/plotly-test-table/260b9c9/scatterplots-jitter
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-boxes
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-boxes-facet-grid
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-boxes-scales-free
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-boxes-space-free
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-breaks-less
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-breaks-more
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-breaks-nochange
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-discrete-order
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-evenly-spaced-ticks
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-flip
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-hide-ticks-labels
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-hide-ticks-lines-labels
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-hide-y
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-hide-y-keep-grid
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-limits-gap
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-limits-hide
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-scale-labels
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-ycontinuous-ranges
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-ylim-ranges
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-ylim-reversed-ranges
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-yreverse-limits-ranges
http://cpsievert.github.io/plotly-test-table/260b9c9/ticks-yreverse-ranges

@cpsievert cpsievert mentioned this pull request Dec 13, 2015
cpsievert added a commit that referenced this pull request Dec 13, 2015
Added legends for boxplots and densities
@cpsievert cpsievert merged commit 5509909 into master Dec 13, 2015
@cpsievert cpsievert deleted the baobao-legend_hide branch December 14, 2015 19:47
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.

2 participants