I'm trying to plot an hysteresis like curve (mean of other curves) using ggplot2, and I would like to have the area of the standard deviation appear over it.
I'm using the following code:
xlabel <- "E [V]"
ylabel <- "I[pA]"
plotdata <- data.frame(x = x21,
y = probe_02_cv$Mean,
lower = (probe_02_cv_m),
upper = (probe_02_cv_M))
ggplot(plotdata) +
geom_line(aes(y = probe_02_cv$Mean, x = x21, colour = "Mean probe2")) +
geom_ribbon(aes(ymin = lower, ymax = upper, x = x21, fill = "st.dev"), alpha = 1) +
scale_colour_manual("", values = "blue") +
scale_fill_manual("", values = "grey12") +
xlab(xlabel) +
ylab(ylabel)
and graphically the result isn't very readable...
Anyone has a good idea on how to solve this?