Skip to content

plotGlPixelRatio not respected by image button download #2050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
j-andrews7 opened this issue Oct 21, 2021 · 2 comments
Closed

plotGlPixelRatio not respected by image button download #2050

j-andrews7 opened this issue Oct 21, 2021 · 2 comments

Comments

@j-andrews7
Copy link

j-andrews7 commented Oct 21, 2021

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.

@cpsievert
Copy link
Collaborator

Have you tried this with the latest version of plotly?

@j-andrews7
Copy link
Author

Huh, my bad, 4.10.0 does indeed fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants