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

Labelled contour lines #28

Closed
AllanCameron opened this issue Dec 7, 2021 · 0 comments
Closed

Labelled contour lines #28

AllanCameron opened this issue Dec 7, 2021 · 0 comments

Comments

@AllanCameron
Copy link
Owner

One of the things I had hoped this package would handle would be labelled contour lines, where there are breaks in the lines for the labels. This is something that comes up now and again on SO, and none of the existing solutions seem that great.

I was about to explore how we might implement this, when I realized that...we already have:

library(geomtextpath)
#> Loading required package: ggplot2

set.seed(1)

df  <- data.frame(x = rnorm(100), y = rnorm(100))

ggplot(df, aes(x, y)) + 
  stat_density2d(geom = "textpath", aes(label = after_stat(level))) +
  theme_classic()

I think we want to include an example like this in our readme and gallery, but the issue is: is this useful enough to warrant its own geom? It would be very little work to create since it's essentially already implemented.

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

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

1 participant