Skip to content

Using ggsave or svglite to save a blended plot svg causes Rstudio to crash #23

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
davidhodge931 opened this issue Nov 26, 2024 · 4 comments

Comments

@davidhodge931
Copy link

davidhodge931 commented Nov 26, 2024

Not sure if this is expected behaviour or not..

library(tidyverse)
library(palmerpenguins)
library(ggblend)
library(svglite)

penguins |>
  ggplot() +
  geom_density(aes(x = flipper_length_mm, fill = species))

ggsave("test.svg") #works

penguins |>
  ggplot() +
  blend(geom_density(aes(x = flipper_length_mm, fill = species)), 
        blend = "multiply")

ggsave("test.svg") #doesn't
image
@davidhodge931
Copy link
Author

davidhodge931 commented Nov 27, 2024

This works... so maybe it's a bug with ggplot2::ggsave or svglite::svglite? Added a Issue to svglite

svg("test.svg")
penguins |>   ggplot() +
  blend(geom_density(aes(x = flipper_length_mm, fill = species)), blend = "multiply")
dev.off()

@davidhodge931 davidhodge931 changed the title svg: trying to save a svg image of a blended plot causes Rstudio to crash Using ggsave to save a svg image of a blended plot causes Rstudio to crash Nov 27, 2024
@davidhodge931 davidhodge931 changed the title Using ggsave to save a svg image of a blended plot causes Rstudio to crash Using ggsave to save a blended plot svg causes Rstudio to crash Nov 27, 2024
@davidhodge931 davidhodge931 changed the title Using ggsave to save a blended plot svg causes Rstudio to crash Using ggsave or svglite to save a blended plot svg causes Rstudio to crash Nov 28, 2024
@mjskay
Copy link
Owner

mjskay commented Nov 29, 2024

Hmm yeah, most likely an issue in the graphics device I would guess.

@davidhodge931
Copy link
Author

Think it's this
r-lib/svglite#174

@davidhodge931
Copy link
Author

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