Discussion:
how to plot flow duration curves
lily li
2018-09-16 09:11:27 UTC
Permalink
Dear ggplot users,

Has anyone plotted flow duration curve in ggplot? How to do it and how to
plot two time series of data on one figure? Also, how to get the values in
y at 0.2 and 0.7 exceedance probabilities? Thanks for your help.
--
--
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 ***@googlegroups.com
To unsubscribe: email ggplot2+***@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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
m***@gmail.com
2018-09-16 09:16:38 UTC
Permalink
At the risk of not understanding the question, I figure a flow duration curve is basically a line plot with 2 different datasets plotted in the x and y where x is a time series and y the result ?



Result of a quick search

https://gist.github.com/TonyLadson/894c5919b5f56a9c5231



but I’d say you just make a long data frame of your data with one time series (x,y ) identified by one variable say timeseries_id with value 1, then the same with the other with value 2.



Then you just need to call a line plot



P <- ggplot2(data= dataset, mapping=aes(x=x, y=y, colour=timeseries_id)+

geom_line()



No ?



Maybe I don’t understand the nature of the data 😊 Can you give an example ?



Best,
M.





From: ***@googlegroups.com <***@googlegroups.com> On Behalf Of lily li
Sent: Sunday, September 16, 2018 11:11 AM
To: ***@googlegroups.com
Subject: how to plot flow duration curves



Dear ggplot users,



Has anyone plotted flow duration curve in ggplot? How to do it and how to plot two time series of data on one figure? Also, how to get the values in y at 0.2 and 0.7 exceedance probabilities? Thanks for your help.
--
--
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 ***@googlegroups.com <mailto:***@googlegroups.com>
To unsubscribe: email ggplot2+***@googlegroups.com <mailto:ggplot2+***@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+***@googlegroups.com <mailto:ggplot2+***@googlegroups.com> .
For more options, visit https://groups.google.com/d/optout.
--
--
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 ***@googlegroups.com
To unsubscribe: email ggplot2+***@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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...