Dear list,
I use the following code to draw the attached plot.
resultPlot <- ggplot()
resultPlot <- resultPlot + geom_bar(data=df, mapping=aes(x=month,
y=value, fill=gear_type, order=gear_type), stat="identity", width=0.8) +
scale_fill_brewer(palette="Set1", name="Gear type")
resultPlot <- resultPlot + geom_errorbar(data=dfPrev5Years,
mapping=aes(x=month, ymax = mean_prev_5_years + stddev_prev_5_years,
ymin=mean_prev_5_years - stddev_prev_5_years), width=0.25,
color="dimgray")
resultPlot <- resultPlot + geom_line(data=dfPrev5Years, mapping=aes(x=month, y=mean_prev_5_years))
resultPlot <- resultPlot + xlab("Month") + ylab("Catches in tons") +
ggtitle(paste(levels(df$species)[1], "monthly catches by gear type on",
levels(df$year)[1]))
print(resultPlot)
No idea ?
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.