Skip to content

ggplotly broken under lastest ggplot2 dev version? #1561

@lozalojo

Description

@lozalojo

Seems that ggplot2 dev version 3.2.0.9000 has broken something in ggplotly.

First, with ggplot2 stable version (the result is as expected), the names of the labels of x-axis.
Second, with ggplot2 dev version (the result is NA), no names of labels.

Both tests made with lastest stable plotly version 4.9.0 under lastest R-devel for Windows 10.

Using stable version of ggplot2 3.2.0

library(plotly)
#> Loading required package: ggplot2
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout
p <- ggplot(iris) +
  geom_point(aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
  scale_x_continuous(breaks = seq(0,3,0.5), limits =c(0,3), labels = letters[1:7])
gg <- ggplotly(p)
gg$x$layout$xaxis$ticktext
#> [1] "a" "b" "c" "d" "e" "f" "g"

Using the lastest dev version of ggplot2:

library(plotly)
#> Loading required package: ggplot2
#> 
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#> 
#>     last_plot
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:graphics':
#> 
#>     layout
p <- ggplot(iris) +
  geom_point(aes(x = Petal.Width, y = Sepal.Length, color = Species)) +
  scale_x_continuous(breaks = seq(0,3,0.5), limits =c(0,3), labels = letters[1:7])
gg <- ggplotly(p)
gg$x$layout$xaxis$ticktext
#> [1] NA

Activity

added 2 commits that reference this issue on Jul 11, 2019
3b4240b
2b09138
added a commit that references this issue on Jul 16, 2019
5178c5d
added a commit that references this issue on Jul 16, 2019
9a9876f
added a commit that references this issue on Mar 12, 2020
32dde41
added a commit that references this issue on Jun 26, 2022
504c33f
added a commit that references this issue on Jul 4, 2022
55f49ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cpsievert@lozalojo

        Issue actions

          ggplotly broken under lastest ggplot2 dev version? · Issue #1561 · plotly/plotly.R