Giter VIP home page Giter VIP logo

Comments (10)

thomasp85 avatar thomasp85 commented on September 13, 2024 1

What I believe @dafxy is after is a spider/radar plot option, which, true, isn't possible currently

I personally only think such a thing makes sense for a discrete scale so I don't know if this should be a new coordinate system altogether or something (wrongly) tacked on to coord_radial()

from ggplot2.

teunbrand avatar teunbrand commented on September 13, 2024

Repeating from previous discussion:
Could you post a reproducible example of where the current behaviour is either misleading or incorrect, whereas the previous behaviour wasn't?

from ggplot2.

dafxy avatar dafxy commented on September 13, 2024

From previous discussion:
That is in the initial measage. Whatever you had in version 3.4.4 was working just fine. This is not about mapping straight lines from Cartesian coordinates onto polar coordinates, curving the plot lines altogether with the axis. This is about having the polar coordinate to help with visualization of the points. Jus that.

from ggplot2.

dafxy avatar dafxy commented on September 13, 2024

Yes!

from ggplot2.

teunbrand avatar teunbrand commented on September 13, 2024

Thanks Thomas, that makes the intent more clear because that is a somewhat different coordinate system than the polar ones.
@dafxy I think you might be looking for coord_radar() offered by {see}.

library(ggplot2)

set.seed(10)
df = data.frame(x = 1:10,
                y = runif(10),
                g = sample(c('A', 'B'))
)
ggplot(df) +
  geom_polygon(aes(x=x, y=y, fill=g), alpha=.5) + 
  see::coord_radar()

Created on 2024-06-20 with reprex v2.1.0

I'm not sure if this is worth carrying over to ggplot2, as it already exists in extension packages.

from ggplot2.

thomasp85 avatar thomasp85 commented on September 13, 2024

An argument for bringing it over would be to give it the same treatment as coord_polar() got with coord_radial(), i.e. support for the new axes

from ggplot2.

teunbrand avatar teunbrand commented on September 13, 2024

One particular nuance is that coord_polar() (on which see::coord_radar() is based) sort-of hardcodes decorations (panels, grid, axes), whereas coord_radial() munches these decorations. Simply setting the is_linear() method to TRUE, as see::coord_radar() does, will mistransform the decorations in coord_radial().

from ggplot2.

thomasp85 avatar thomasp85 commented on September 13, 2024

yes, we obviously need a better approach if we should do it... For now see is the way

from ggplot2.

teunbrand avatar teunbrand commented on September 13, 2024

An additional concern will be how to treat polygons spanning start/end boundaries.

image

from ggplot2.

teunbrand avatar teunbrand commented on September 13, 2024

I'm going to consider this a feature request for a spider/radar coord instead of a report on the lack of options.

from ggplot2.

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.