plotly.R icon indicating copy to clipboard operation
plotly.R copied to clipboard

dynamicTicks = T does not respect position attribute in geom_point()

Open andrew-fuller opened this issue 4 years ago • 3 comments

I would like to use the dynamic ticks option with my plots in shiny although I am running into an issue with my plots that use a discrete x axis.

Plots appear as they should with dynamicTicks = F, however, after setting to TRUE the position = argument doesn't seem to be respected.

Furthermore, I notice that when using plotly_json() that some of the data items seem to go missing.

Any help with this issue would be much appreciated.

library(tidyverse)
library(plotly)

g <- mtcars %>%
  ggplot(aes(fill = as_factor(carb))) +
  geom_point(aes(x = as_factor(cyl), y = mpg), position = position_dodge(width = 0.5))

p <- ggplotly(dynamicTicks = T)

p

andrew-fuller avatar Nov 17 '20 23:11 andrew-fuller

Anyone found a solution for this? I'm facing the same problem.

DaniFlat avatar Dec 02 '21 18:12 DaniFlat

I'm still struggling with this problem. Does anyone know a fix?

DaniFlat avatar Aug 23 '22 10:08 DaniFlat

I never found a fix for this but it would be greatly appreciated if someone knew a work around.

andrew-fuller avatar Sep 20 '22 23:09 andrew-fuller