-
Notifications
You must be signed in to change notification settings - Fork 635
Closed
Description
Using dynamicTicks on a plotly object obtained using ggplotly, changes the date labels.
I created a ggplot object, and set the date_labels to "%m/%y".
The ggplotly output changes this date format to "%b %Y"
library(ggplot2)
library(plotly)
x <- seq(as.POSIXct(Sys.Date()), as.POSIXct(Sys.Date() + 365) , by = "months")
y <- seq(1:length(x))
df <- data.frame(x, y)
(p <- ggplot(df, aes(x, y)) +
geom_point() +
scale_x_datetime(date_breaks = "1 month", date_labels = "%m/%y") +
theme(axis.text.x = element_text(angle = 90)))
ggplotly(p, dynamicTicks = TRUE) %>%
layout(margin = list(b = 70))
Removing the dynamicTicks property leaves the x-axis labels unchanged.
This looks like the issue #860, which is already closed.
Metadata
Metadata
Assignees
Labels
No labels


