Skip to content

Plotly error for large facet_grid #640

Closed
@hmaeda

Description

@hmaeda

I think I might have found a bug associated with the ggplotly function in the plotly package.

In the following bit of code, the result works for n = 9 but not n >= 10.

Can anybody suggest a work around, or at least a reason for the bug?

require(data.table)
require(plotly)
require(ggplot2)

n <- 10
jj <- CJ(week=c(1:n),day=c('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),hour=c(0:23))
jj[,day:=factor(day,levels = c('Sun','Mon','Tue','Wed','Thu','Fri','Sat'))]
jj[,n:=rnorm(nrow(jj))]
p1 <- ggplot(jj,aes(x=hour,y=n))+geom_line()+facet_grid(week~day)
p1
p1 <- ggplotly(p1)
p1

Thanks,

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

    Issue actions