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

Feature request for @geom_density macro #25

Closed
christophscheuch opened this issue Sep 5, 2023 · 3 comments
Closed

Feature request for @geom_density macro #25

christophscheuch opened this issue Sep 5, 2023 · 3 comments

Comments

@christophscheuch
Copy link

christophscheuch commented Sep 5, 2023

Would be great if we could also create density plots as they are part of the basic visualization types in R4DS.

I guess it is a fairly low hanging fruit because AlgebraOfGraphics.jl provides the density function.

Here are some hypothetical examples:

using Tidier, PalmerPenguins
penguins = DataFrame(PalmerPenguins.load())

@ggplot(penguins, aes(x = body_mass_g)) +
  @geom_density()

@ggplot(penguins, aes(x = body_mass_g, color = species, fill = species)) +
  @geom_density(linewidth = 0.75, alpha = 0.5)
@rdboyes
Copy link
Member

rdboyes commented Sep 20, 2023

This is added - and adding new geoms that are supported in AoG really is low hanging fruit if anyone wants to try! See commit ecfc96f for all the code that was required to add this functionality :)

@ggplot(penguins, aes(x = body_mass_g, color = species, fill = species)) +
  @geom_density(linewidth = 0.75, alpha = 0.5)

plot_3

@kdpsingh
Copy link
Member

That's pretty amazing that it's so straightforward to add a geom on top of what you've already built.

Okay if I update the version and release to the registry?

@rdboyes
Copy link
Member

rdboyes commented Sep 21, 2023

Yep! I fixed the automatic missing value handling as well from issue #24

@rdboyes rdboyes closed this as completed Sep 21, 2023
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

3 participants