I've created a plot with the following commands:
p <- ggplot(plotData, aes(x = variable, y = value, colour = catVar,
group = catVar))
p <- p + stat_summary(fun.y = mean, geom = "line")
p <- p + stat_summary(fun.ymax = errorUpper, fun.ymin = errorLower,
geom = "errorbar", width=0.25)
Even if I print the plot without errorbars, the y-limit is too high.
It looks like it takes the raw data to calculate the y-limit instead
of the summarized data. Is it true? Is there any other solution beside
changing the viewport?
Or is there any mistake I'm not aware of?