I'm new here, so plz if I forgot sth, forgive me.
I'm trying to get sth like the image below. But I'm struggling in two points: my lines don't start directly from the y-axis and I want below the measurement of the x-axis and the label of the x-axis two labels as legend to the vline. I tried to get it with annotation\_custom, but this placed it in the plot itself, but I want it on the x-axis or at the top of the plot without being written on the graph itself.

So far I used the following code:

```
require(reshape)
library(ggplot2)

user <- gl(3, 1)
Meas1 <- c(0.7, 0.3, 0.3)
Meas2 <- c(0.7, 0.3, 0.3)
Meas3 <- c(0.2, 0.4, 0.4)
group <- c(3, 2, 2)
df <- data.frame(user=user, Meas1=Meas1, Meas2=Meas2, Meas3=Meas3, group=group)

dfm <- melt(df, id.vars=c("user", "group"))
flevels=as.vector.factor(unique(dfm$variable))

ggplot(dfm, aes(x=factor(variable), y=value, colour=user, group=user)) + 
  geom_line() + 
  scale_x_discrete(breaks=flevels, labels=flevels)

```

This is how i would like to have it (the labels are class1 and class2)

[![enter image description here](https://i.stack.imgur.com/ZGgmf.png)](https://i.stack.imgur.com/ZGgmf.png)

I would really appriciate your help.