ggjoy: Create a ggplot2-based Joyplots
Joyplots consist of partially overlapping line plots for visualizing changes in distribution over time or space. Joyplots can be easily created in R using the ggjoy package, which is an extension of ggplot2.
Install ggjoy
install.packages("ggjoy")
Use ggjoy
In the example below, we’ll use the iris demo data set. We’ll visualize the distribution of the variable Sepal.Length by groups (“Species”).
library(ggplot2)
library(ggjoy)
ggplot(iris, aes(x = Sepal.Length, y = Species)) +
geom_joy() +
theme_joy()
Control the overlap of the different density plots. Use the argument scale .
ggplot(iris, aes(x = Sepal.Length, y = Species)) +
geom_joy(scale = 0.9) +
theme_joy()
Enjoyed this article? Give us 5 stars
(just above this text block)! Reader needs to be STHDA member for voting. I’d be very grateful if you’d help it spread by emailing it to a friend, or sharing it on Twitter, Facebook or Linked In.
Show me some love with the like buttons below... Thank you and please don't forget to share and comment below!!
Avez vous aimé cet article? Donnez nous 5 étoiles
(juste au dessus de ce block)! Vous devez être membre pour voter. Je vous serais très reconnaissant si vous aidiez à sa diffusion en l'envoyant par courriel à un ami ou en le partageant sur Twitter, Facebook ou Linked In.
Montrez-moi un peu d'amour avec les like ci-dessous ... Merci et n'oubliez pas, s'il vous plaît, de partager et de commenter ci-dessous!
Recommended for You!
Recommended for you
This section contains the best data science and self-development resources to help you on your path.
Books - Data Science
Our Books
Others