Comments (6)
Also, just to add to this, I realize I could do a workaround like the below (which is what I'm doing currently). Maybe that's sufficient? I had just expected the above to work.
library(geomtextpath)
#> Loading required package: ggplot2
ggplot(iris, aes(Sepal.Length)) +
geom_density(aes(fill = Species), alpha = 0.3) +
geom_textdensity(aes(color = Species, label = Species),
hjust = "ymax", vjust = -0.2) +
guides(fill = "none", color = "none")
Created on 2022-02-04 by the reprex package (v2.0.1)
from geomtextpath.
Hi Daniel - thanks for taking the time to write.
Currently we haven't implemented the fill because the aesthetic name would clash with the fill for the textbox-flavoured variety of labelled density curve. Obviously the work-around, as you show, is to plot a normal geom_density
first.
In future iterations we might change the textbox fill to its own aesthetic to avoid this kind of thing - we do aim to try to have things "just work" as users expect, so I'll leave this open so that Teun and I can mull this over.
Thanks again.
from geomtextpath.
I've found myself looking for a ribbon or polygon geom with text on the edges at some point, so I do see some merit to this. But there wasn't anything that couldn't be fixed by putting a polygon underneath the textpath geom, so it hasn't been strictly necessary. The thing I have a small worry about, is that when we opt to support polygons, it creates the expectation that specialised filled geoms such as violin plots, ribbons, area, rectangles, tiles, maybe even boxplots will also be supported. I don't have anything against this per se, but it does become a lot to maintain.
from geomtextpath.
Yes, I had wondered about geom_textpoint
too which is almost pointless, apart from the polar coordinate transformation, and (more saliently) people will just expect it to exist. You and I both know from Stack Overflow that it doesn't matter how well you document things - the casual user will just expect things to work "out the box", and they get stuck if it doesn't.
With regards to rectangular and polygon-based geoms, I do think people would like directly labelled versions, and I have considered this. I think it probably depends on getting more feature requests like this one, and seeing how the package is used in the wild.
Knowing that you and I are both tinkerers, it almost seems inevitable that one or both of us will attempt to implement this at some point, but I'm happy at the moment to wait for a bit more feedback.
from geomtextpath.
Thank you both, I'm totally happy with things as they are and the workaround is not a big deal. But I really appreciate you taking the time to consider it.
from geomtextpath.
Heh, 'pointless point geom'! I think the wait and see approach is a sensible one.
from geomtextpath.
Related Issues (20)
- Request something like "dodge" along path HOT 3
- Chinese character support HOT 3
- geom_labelsf() not recognizing aesthetics HOT 5
- While working with ragg, minuses aren't drawn HOT 2
- geom_textpath() always draw a empty box when label is ""
- Ignoring unknown parameters: text_smoothing HOT 10
- Feature request - multiple labels per line HOT 7
- geom_textsmooth computation fails if method argument is not specified HOT 3
- ggplot2 is separating size and linewidth HOT 2
- Negative values in geom_textcontour not appearing HOT 2
- geom_textlinerange HOT 1
- Question on angle HOT 1
- text_only in geom_labelsegment
- Feature request - avoid text overlapping
- two labels on same curve HOT 5
- straight argument unknown in geom_textsf() HOT 2
- `label` aesthetic in `geom_textdensity2d` HOT 2
- R 4.3.0 and glyphs 👀 HOT 1
- Can't get things to work HOT 11
- vjust and hjust as aesthetics in geom_textsf HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geomtextpath.