-names(df$state) = c("Type", "Actor", "Container", "Start", "End", "Duration", "Level", "State")
-
-# Actually draw the graph
-p = ggplot(df$state) + geom_segment(aes(x=Start, xend=End, y=Actor, yend=Actor,color=State), size=5)
+df$state %>%
+ # rename some columns to use simgrid terminology
+ rename(Actor = Container,
+ State = Value) %>%
+ # do the plot
+ ggplot() +
+ geom_segment(aes(x=Start, xend=End, y=Actor, yend=Actor, color=State), size=5) -> p