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

Expose padding #30

Merged
merged 6 commits into from
Dec 7, 2021
Merged

Expose padding #30

merged 6 commits into from
Dec 7, 2021

Conversation

teunbrand
Copy link
Collaborator

As discussed in #27 (comment), this exposes the padding parameter (previously 'breathing room') to the user. Quick demo:

library(geomtextpath)
#> Loading required package: ggplot2
#> Warning: package 'ggplot2' was built under R version 4.1.1
library(patchwork)

p <- ggplot(iris, aes(x = Sepal.Length, colour = Species)) +
  geom_textpath(aes(label = Species), stat = "density", hjust = 0.2,
                padding = unit(1, "cm"))

q <- ggplot(iris, aes(x = Sepal.Length, colour = Species)) +
  geom_textpath(aes(label = Species), stat = "density", hjust = 0.2,
                padding = unit(1, "mm"))

p + q & guides(colour = "none")

Created on 2021-12-07 by the reprex package (v2.0.1)

@AllanCameron AllanCameron merged commit 6a92180 into AllanCameron:main Dec 7, 2021
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

Successfully merging this pull request may close these issues.

2 participants