Skip to content

3D scatter plot axis disappears when using constant large integers #1765

Open
@vkresch

Description

@vkresch

There seems to be an issue with plotting constant Sys.time() in the 3d scatter plot. It is not only restricted to Sys.time() but in general to large integer numbers. You can also replace it with 1589393061. The y axis just disappears. Below I show a bad plotting and a good plotting when using the format function. Is this a bug?

library(plotly)
data_bad<-data.frame(x=c(1,2,3,4,5),
                     y=rep(Sys.time(),5),
                     z=c(3,2,5,23,6),
                     w=c("a","a","b","b","c"))

p_bad <- plot_ly(data_bad, x=~x, y =~y , z =~z, color = ~w, 
                 type="scatter3d", mode="markers")
p_bad

data_bad2<-data.frame(x=c(1,2,3,4,5),
                     y=rep(1589393061,5),
                     z=c(3,2,5,23,6),
                     w=c("a","a","b","b","c"))

p_bad2 <- plot_ly(data_bad2, x=~x, y =~y , z =~z, color = ~w, 
                 type="scatter3d", mode="markers")
p_bad2

data<-data.frame(x=c(1,2,3,4,5),
                 y=rep(format(Sys.time(), "%Y-%M-%D %H:%M:%S"),5),
                 z=c(3,2,5,23,6),
                 w=c("a","a","b","b","c"))
p <- plot_ly(data, x=~x, y =~y , z =~z, color = ~w, 
             type="scatter3d", mode="markers")
p

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