Helper function to calculate sensible y axis limits from the data
Source:R/universal_report_functions.R
dynamic_ylim.Rd
dynamic_ylim
takes the data for a variable and calculates the maximum
value of the background and present period plotting variables, finds the
maximum of those values and adds 10
Lower y limit is zero. Is highly very specific to data structure created
when processing the annual report data.
Value
a numeric vector of length 2, first value zero, second the calculated y limit. Will be passed to ylim argument in a ggplot call.
Author
Bart Huntley, bart.huntley@dbca.wa.gov.au
For more details see https://dbca-wa.github.io/rivRmon/index.html the rivRmon website