Skip to contents

plot hydraulics.

Usage

# S3 method for class 'hydraulic'
plot(
  x,
  output_dir = ".",
  device = "display",
  view = c("height", "discharge"),
  ...
)

Arguments

x

an object of class hydraulic

output_dir

character, path directory where output is saved. Default to current directory

device,

character, defines way of plotting. Can only be one device at a time. If display is selected only one view can be shown at a time

view,

vector of character, defines which view shall be plotted Two options: "height", "discharge"

...

some extra parameters (unused)

Value

Nothing

Details

This is a new method for the plot function. It can be used to display graphs or save graphs in different formats (.png and .pdf). The .png is in a lower resolution than .pdf but is much lighter.

Examples


# generate limnigraph
flood = generate_limnigraph(
  time = c(0, 300, 900),
  depth = cbind(external_1 = c(0, 3, 0)),
  external = list(
    external_1 = c("wall_A", "wall_B", "wall_C", "wall_D", "wall_E", "wall_F", "wall_G", "wall_H"))
)
#> generating limnigraph ...
#>  limnigraph successfully generated

hydraulic = analyse_hydraulic(
  model = adu_t,
  limnigraph = flood,
  opening_scenario = "close",
  sim_id = "test",
  stage = "hydraulic"
)
#> Simulating hydraulics for 'adu_t'...
#> 	... hydraulics successfully modeled for 'adu_t'
#> End of analysis for 'adu_t'. Total elapsed time 0.20 secs

plot(hydraulic)

plot(hydraulic, device = "png", view = c("height", "discharge"), output_dir = tempdir())
#> [1] "Water height view save in /tmp/RtmpRxWMul/water_height.png"   
#> [2] "Water height view save in /tmp/RtmpRxWMul/water_discharge.png"