Skip to content
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

Poor Quality Sticker when Saving on Windows #97

Closed
thomas-neitmann opened this issue May 30, 2020 · 0 comments
Closed

Poor Quality Sticker when Saving on Windows #97

thomas-neitmann opened this issue May 30, 2020 · 0 comments

Comments

@thomas-neitmann
Copy link
Contributor

In the process of creating a sticker for my {ggcharts} package I discovered that the png() device has very poor defaults on Windows. Here's what my sticker looked like when saving with sticker(). As you can see the lines are very ragged.
ggcharts_hex

I ended up doing this to get a high-quality sticker: Notice the arguments passed to type and antialias.

hex <- sticker()
png(
  filename = "sticker.png",
  width = 43.9,
  height = 50.8,
  bg = "transparent",
  units = "mm",
  type = "cairo-png",
  antialias = "subpixel",
  res = 300
)
print(hex)
dev.off()

ggcharts_hex

It would be great if hexSticker could use png() rather than ggsave() and set the type and antialias parameters as I did on Windows.

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