Skip to content

plotGlPixelRatio not respected by image button download #2050

Closed
@j-andrews7

Description

@j-andrews7

The plotGlPixelRatio config setting is not respected when using a scattergl trace and attempting to download the image in svg format via the image download button. This option was previously broken in older versions of plotly but was fixed and should have made its way into the R version now as well.

I expect this is an issue with RStudio's lack of webGL rendering as noted in the warning, but opening the figure in a new browser window has the same issue.

library(plotly)
 
fig <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, type = "scattergl", mode = "markers") %>%
    config(plotGlPixelRatio = 10, toImageButtonOptions = list(format = "svg"))

fig2 <- plot_ly(data = iris, x = ~Sepal.Length, y = ~Petal.Length, type = "scattergl", mode = "markers") %>% 
    config(plotGlPixelRatio = 1, toImageButtonOptions = list(format = "svg"))

These images downloaded from a browser window will be the same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions