Description Usage Arguments Details Author(s) Examples
Axis transforms for hydrologic plots in ggplot2.
1 | flowBreaks(Q, labels = c(1, 2, 3, 5, 7), blankLines = TRUE)
|
Q |
values for flow to create scale along |
labels |
First digit of breaks to label. Defaults to 1,2,3,5,7 for log axes; 1,2,5 for probability axes. Multiples of these are assumed. |
blankLines |
(default |
maxLevel |
smallest place to which breaks should be created for probability axes. |
lines |
which breaks should have lines for probability axes, must be superset of labels |
invert |
switch the direction of the probability axes |
as.percent |
Show labels by percent instead of probability |
byPeriod |
Show labels with return interval (1 / probability) |
periodSuffix |
String to concatenate to return interval. (default |
distribution |
change distribution for probability axis, defaults to normal. Untested with other distributions. |
distArgs |
arguments pasted to distribution specified in |
hydro_prob_trans
and hydro_prob_breaks
for probability axes on frequency plots
hydro_flow_trans
and hydro_flow_breaks
for log axes with additional breaks between powers of ten.
Evan Heisman
1 2 3 4 5 | ggplot(peaks, aes(y=PEAK_DAILY_FLOW, x=weibullProbs(PEAK_DAILY_FLOW))) + geom_point() +
theme_bw(base_size=11) + theme(legend.position = "bottom", panel.grid.minor=element_blank()) +
scale_y_continuous(trans=hydro_flow_trans()) +
scale_x_continuous(trans=hydro_prob_trans(lines=c(1,2,5), labels=c(1,2,5), byPeriod=TRUE)) +
stat_smooth(method="glm", family=gaussian(link="log"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.