Skip to content

ggplotly for geom_bar turns negative values into positive #616

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

Closed
MarkEdmondson1234 opened this issue May 31, 2016 · 2 comments
Closed

ggplotly for geom_bar turns negative values into positive #616

MarkEdmondson1234 opened this issue May 31, 2016 · 2 comments

Comments

@MarkEdmondson1234
Copy link

Negative values become positive:

library(ggplot2)
library(plotly)
d <- data.frame(s = c("a","b","c"), v = c(-1,-2,3))
hh <- ggplot(d, aes(x = s, y = v))
hh <- hh + geom_bar(stat = "identity")
hh

screen shot 2016-05-31 at 15 24 12

plotly::ggplotly(hh)

screen shot 2016-05-31 at 15 24 23

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.5 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

Versions

plotly_3.6.0
ggplot2_2.1.0

@MarkEdmondson1234 MarkEdmondson1234 changed the title ggplotly for barplots turns negative values into positive ggplotly for geom_bar turns negative values into positive May 31, 2016
@timelyportfolio
Copy link
Collaborator

@MarkEdmondson1234, thanks for reporting. This is a duplicate of #560, so we will track progress there. Unfortunately, there is not a workaround at this moment.

@timelyportfolio
Copy link
Collaborator

@MarkEdmondson1234 see #560 (comment) for how to accomplish with just plain plot_ly

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

2 participants