Giter Club home page Giter Club logo

Comments (6)

datalorax avatar datalorax commented on July 24, 2024

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.

AllanCameron avatar AllanCameron commented on July 24, 2024

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.

teunbrand avatar teunbrand commented on July 24, 2024

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.

AllanCameron avatar AllanCameron commented on July 24, 2024

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.

datalorax avatar datalorax commented on July 24, 2024

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.

teunbrand avatar teunbrand commented on July 24, 2024

Heh, 'pointless point geom'! I think the wait and see approach is a sensible one.

from geomtextpath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.