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
0 answers

Attempting to load in ggridges and getting "Error: package or namespace load failed"

I'm trying to make a Joy Division style elevation map using QGIS and R. However when I try to load libraries gplot2, ggridges, and maproj, I get an error with ggridges: library(ggplot2) library(ggridges) **Error: package or namespace load failed for…
dark-walrus
  • 101
  • 1
  • 6
0
votes
1 answer

Add markings/labels to Ridgeline plot [R / ggplot2]

I've made a ridgeline plot, but I would like to add custom markers to it (pop in my added reprex). The best I can come up with is adding a label. This is not ideal. I found this link, which is more in line from what I want. but I can't get the…
Chiel
  • 47
  • 1
  • 8
0
votes
1 answer

Using geom_ridgeline with a log y-axis

I am trying to visualise timeseries data, and thought the ggridges package would be useful for this. However some of my data needs to be plotted on a log-scale. Is there a way to do this? I tried it using y = 0.001 instead of 0, as y = zero fails,…
Jenni G
  • 35
  • 1
  • 4
0
votes
1 answer

In ggridges, how to colour code points without getting multiple ridges?

I'm trying to show points on my ridge plot by an index (PASS or FAIL in this case). But when I do that, I end up with two ridges per group. I am wondering how to have only one ridge per group? My code, and the image of output…
0
votes
1 answer

ggridges color gradient per group

I am trying to make a ridgeline plot with two groups and a color gradient within each group. So from dark blue to light blue for the Unionists and dark red to light red for the Indy group, for example. Thanks in…
0
votes
1 answer

Combining geom_vridgeline with geom_line in one plot

I would like to combine geom_vridgeline with a (connected) line chart. The values for geom_line (and geom_point) come from a different dataset. I.e. it is not a moment (mean, median etc.) of the observations used in geom_vridgeline. I tried the…
0
votes
0 answers

Two independent density plots in single graph using ggridges

Fairly new to R so please excuse the crude code! I have a population of marked insects which I follow monthly. The marking level (ppm) decays over time. I would like to show a monthly density plot using ggridges, where the first month (9) showing…
RoMan
  • 1
0
votes
1 answer

How to deal with 'Error in data.frame(..., check.names = FALSE) 'when I use ggplot?

I am trying to draw Density ridgeline plots. So I went to see Introduction to ggridges. Ridgelines can be drawn at the moment, but there was a problem when painting Density ridgeline plots. But I get this error: Error in data.frame(..., check.names…
soda310
  • 1
  • 1
0
votes
1 answer

Computed variables in ggridges

Here is a MWE: library(ggplot2) library(ggridges) ggplot(iris, aes(x=Sepal.Length, y=Species, fill=..x..)) + geom_density_ridges_gradient() My query is : can we not say fill = Sepal.Length? I understand that ..x.. refers to a computed variable x…
user2338823
  • 501
  • 1
  • 3
  • 16
0
votes
1 answer

R Coding for ggridges

I am new to coding in R so please excuse the simple question. I am trying to run ggridges geom in R to create monthly density plots. The code is below, but it creates a plot with the months in the wrong order: The code references a csv data file…
Ski bum
  • 41
  • 1
  • 1
  • 3
-1
votes
1 answer

change line color in ggridges

How to change the line color or shape in a ggridge density plot? ggplot(iris, aes(x = Sepal.Length, y = Species)) + geom_density_ridges2() + scale_y_discrete(expand = c(0.01, 0)) + scale_x_continuous(expand = c(0.01, 0)) + theme_ridges()
Jellz
  • 435
  • 1
  • 7
  • 14
1 2 3 4 5 6
7