Skip to content
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

Issues with geom_boxplot(position = "dodge") #1644

Open
romabhu opened this issue Oct 21, 2019 · 6 comments
Open

Issues with geom_boxplot(position = "dodge") #1644

romabhu opened this issue Oct 21, 2019 · 6 comments

Comments

@romabhu
Copy link

romabhu commented Oct 21, 2019

I am using ggplot to generate the boxplot in server.r
But when I am trying to show plot on ui using ggplotly through renderPlotly() in shiny, plot is getting changed.

Please refer attached R-code and image of plot getting generated.

BoxPlot_GGPLOTLY_Issue
BoxPlot_Issue.zip

@cpsievert
Copy link
Collaborator

cpsievert commented Oct 21, 2019

@romabhu thanks for the report, there's a WIP for fixing the issue #1514. Feel free to give it a test run

devtools::install_github("ropensci/plotly#1514")

@romabhu
Copy link
Author

romabhu commented Oct 30, 2019

@cpsievert , thanks for sharing this in progress version.
I have tried it, it is working fine.

Please let me know, when can this changed be merged with current plotly package and deployed. So that we can install it from cran.

@cpsievert cpsievert changed the title Difference of output in ggplot and ggplotly in Rshiny Issues with geom_boxplot(position = "dodge") Nov 6, 2019
@romabhu
Copy link
Author

romabhu commented Jan 28, 2020

Any update on this issue?

@jbrnbrg
Copy link

jbrnbrg commented Aug 1, 2020

Any update on this issue?

p <-ggplot(dfmelt, aes(x=factor(round_any(x,0.5)), y=value,fill=variable)) + geom_boxplot()

ggplotly(p) %>% layout(boxmode = "group")

@thomashusken
Copy link

Any update on this issue?

p <-ggplot(dfmelt, aes(x=factor(round_any(x,0.5)), y=value,fill=variable)) + geom_boxplot()

ggplotly(p) %>% layout(boxmode = "group")

Thanks, this saved me some headaches!

amstilp added a commit to UW-GAC/GENESISModelExplorer that referenced this issue Feb 9, 2022
Filled boxplots did not have position = dodge in plotly - instead,
all boxes appear on top of each other. This can be fixed by setting
the layout of boxmode to group, but it also produces a number of
warnings. These warnings can apparently be ignored, but I haven't
found a good way to do that yet. (suppressWarnings seems dangerous,
and expect_warning makes the test code cluttered.)

Info about this warning:
plotly/plotly.R#1644
https://community.plotly.com/t/not-a-real-error-for-boxmode/2596
@DaniFlat
Copy link

DaniFlat commented Aug 23, 2022

any solution for using position dodge with geom_point?
layout(boxmode = "group")
does not work in this case

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

No branches or pull requests

5 participants