my dataset is
cvar setting value
var1 min 20
var2 min 5
var3 min 140
var4 min 40
var5 min 600
var1 max 60
var2 max 15
var3 max 180
var4 max 80
var5 max 1200
var1 center 40
var2 center 10
var3 center 160
var4 center 60
var5 center 900
var1 upper 57
var2 upper 13
var3 upper 162
var4 upper 79
var5 upper 1250
var1 lower 20
var2 lower 6
var3 lower 153
var4 lower 40
var5 lower 620
With
library(ggplot2)
ggplot(data=daten, aes(x=factor(cvar), y=value, group = setting, color = setting)) +
geom_line() +
coord_polar()
I get something close to what I am looking for. I would like to have each of the axes scaled individually, either from 0 to the respective max or with individual min and max for each.
Could someone give me a hint, please? Thanks in advance Holger
If you mean you want the range of values to be scaled for each
cvar
, you can do that before passing the data frame to ggplot:Edit: If you want to join the first and last
cvar
values, you can repeat var1 at the end of the x-axis, and explicitly setexpand = c(0, 0)
so that the lastcvar
value joins up with the first under polar coordinates:And if you want the lines to be straight under polar coordinates, the answer here describes an alternative: