Questions tagged [ggridges]

The ggridges R package is an add-on package to ggplot2. It provides geoms, stats, themes, and scales useful for the creation of ridgeline plots.

Resources:

  1. Introduction to ggridges
  2. github project
102 questions
0
votes
1 answer

Ridgeline plot for multiple columns (instead of multiple groups of the same column)

I want to build ridgeline plot where each density corresponds to a different column (not a different group of the same column). Is there a way to do this in ggplot?
Marti
  • 67
  • 5
0
votes
0 answers

Missing aesthetics in geom_density_ridges error despite providing required aesthetics?

I am trying to create a ridgeline graph to visually compare the distribution of monthly data. For each month, I have 20 temperature data generated from 100m areas moving outwards from a point. A ridgeline graph will enable me to both show the…
strangecharm
  • 186
  • 11
0
votes
0 answers

ggridges geom_density_ridges not plotting with set size of 2

I'd like to make a Joy plot of a bunch of distributions. A few of my sets only have two numbers and geom_density_ridges skips these sets. However, geom_violin works fine with a set size of 2. Anybody know why these are different or how to make…
Micah
  • 1
  • 1
0
votes
0 answers

Regarding about the ggridges graphs in r studio

I have try to plot using the ggridges package. My code runs but the plot only shows white empty space. If I change the alpha values, I get Picking joint bandwidth of NaN Sample data # Create the dataframe sample <- data.frame(No = 0:4, nm =…
vigneshmoham
  • 1
  • 1
  • 3
0
votes
0 answers

ggiraph for ridgeline plot with trace?

I'm trying to do a ridgeline plot in R, such as this one from the Introduction to ggridges: However, I also want hover interactivity tracing the (x,y)-values (and potentially some more characteristics). The problem: Plotly have not implemented…
SimonSimon
  • 47
  • 6
0
votes
1 answer

Adding percentage to ggridges plot

I would like to use ggridges to plot a binned ridgeline, with the percentage of each bin labelled to the bins. I have attempted to use geom_text(stat ="bin) to calculate percentages, but the calculation use all the data. I would like to calculate…
user236321
  • 95
  • 1
  • 5
0
votes
1 answer

Modifying shading in ridge plot

With the R code below, library(ggplot2) library(ggridges) iris$m <- iris$Sepal.Length-5.5 pp <- aggregate(m ~ Species, iris, function(x) 1-ecdf(x)(0)) names(pp)[2] <- 'P' dat <- merge(iris[, c('Species', 'm')], pp) dev.new(width=6,…
bluepole
  • 323
  • 1
  • 12
0
votes
1 answer

Set different color line for mean and quantile in geom density ridges plot

I'm working on a temperature data set over time. I used a density ridges plot to visualize my data by month. On each plot I included the median and the mean. I would like to distinguish them by highlighting them in different colors. Here is the code…
HMK
  • 47
  • 4
0
votes
0 answers

Distribution curves in ggplot2 raincloud plot display incorrectly

I noticed strange behaviour of the raincloud plot package in R. Specifically, density curves are sensitive to data values in some (but not all) cases. It seems that the shape of the distribution curve made by geom_flat_violin() is somehow linked to…
MARO
  • 1
  • 1
0
votes
1 answer

Picking joint bandwidth of NaN within ggridge

I am trying to generate ridge plot like the one described here but error "Picking joint bandwidth of NaN" keeps showing up. What's wrong with this? Thankful for any pointer, tip. Best toplot = structure(list(Year = c("2000", "2000", "2001", "2001",…
0
votes
1 answer

ggridges with time series - R

I have a DF and I wanted to do a density graph with geom_density_ridges from ggridges, but, it's returning the same line in all states. What I'm doing wrong? I would like to add trim = TRUE like in here, but it returns the following error…
0
votes
1 answer

Adding a secondary axis to ggplot2 ggridges (joyplot) to show counts in each bin

I have a ridge plot made with the ggridges package, using the stat = 'binline' argument to plot a histogram for each group. I would like to show the counts for each group on a secondary y-axis at left, with at least one or two axis ticks per group.…
qdread
  • 3,389
  • 19
  • 36
0
votes
1 answer

Non-overlapping ridgeline plot R

Hi everyone I was looking at some ridgeline plots in R, more specifically in the post "Introduction to ggridges", and my goal is to make this plot but without the overlap: library(ggplot2) library(ggridges) ggplot(iris, aes(x = Sepal.Length, y =…
mauron
  • 9
  • 2
0
votes
1 answer

Is there a way in R to overlay 3 density plots, with time as the x axis, and count as the y axis?

so this has been driving me mad and I would love if someone could help! I have a dateset with 3 columns. Each column is filled with dates. Each date represents a post on a social media platform. For example, if 2 posts were posted to twitter on…
Miriam
  • 11
  • 2
0
votes
1 answer

How to fill part of density curve in ggridges together with facets

I would like to color a specific area, where col_bol = 1 in a ggridges density curve plot. I know its possible to do this using stat_density_ridges() providing quantiles. If I dont have the quantiles I calculate the percent. This works if it's only…
MLEN
  • 2,162
  • 2
  • 20
  • 36