Plot the dive curve depending on time and depth. Only represent square profile

# S3 method for ndive
plot(
  x,
  ...,
  dtr_print = FALSE,
  hour_print = TRUE,
  line_print = TRUE,
  deco_print = TRUE,
  depth_print = TRUE,
  time_print = TRUE,
  def_cols = FALSE,
  cut_inter = 60,
  legend = FALSE,
  add = FALSE
)

Arguments

x

an object of class ndive.

...

every argument for the plot function such as graphical parameters for lines. Classical graphical parameter applies on the dive curve

  • type for the size line, set to 'b' by default.

  • xlab set to 'Time' by default, see title.

  • ylab set to 'Depth' by default, see title.

dtr_print

set to TRUE by default, whether there is text and line for ascent time.

hour_print

set to TRUE by default, whether there is the hour at beginning and end of the dive.

line_print

set to TRUE by default, whether there is lines for depths.

deco_print

set to TRUE by default, whether there is information about desat stop for depths and times.

depth_print

set to TRUE by default, whether there is depth values along the dive.

time_print

set to TRUE by default, whether there is time values along the dive.

def_cols

set to FALSE by default, modify plot colors to match shinyapp css.

cut_inter

60 by default above which the plot is cut in x axis to maintain readibility

legend

set to FALSE by default, print legend about the ascent speeds.

add

set to FALSE by default, to add another dive plot on a precedent one.

See also

  • plot, title and par for plot parameter that were omitted on this documentation

  • ndive for every aspect about ndive object creations.

Author

Jaunatre Maxime <maxime.jaunatre@yahoo.fr>

Examples

# Consecutive dives d <- ndive(dive1 = dive(18,11), dive2 = dive(15,40), inter = 1)
#> Warning: A minimum of 15 minutes is requiered between dives to consider them #> as different dives.
plot(d, main = 'consec')
# Consecutive dives with second impossible d <- ndive(dive1 = dive(35,11), dive2 = dive(30,20), inter = 4)
#> Warning: A minimum of 15 minutes is requiered between dives to consider them #> as different dives.
plot(d, def_cols = TRUE, main = 'no_consec')
# Successive dive when inter <= cut_inter d <- ndive(dive1 = dive(18,40), dive2 = dive(15,30), inter = 60) plot(d, def_cols = TRUE, main = 'success no cut')
# Successive dive when inter > cut_inter d <- ndive(dive1 = dive(20,40), dive2 = dive(20,30), inter = 121) plot(d, def_cols = TRUE, main = 'success cut')
# Successive dive with second impossible d <- ndive(dive1 = dive(18,40), dive2 = dive(35,30), inter = 120)
#> Warning: Second dive impossible due to majoration of time
plot(d, def_cols = TRUE, main = 'maj_no_success')
# Successive dive with second impossible d <- ndive(dive1 = dive(62,11), dive2 = dive(15,30), inter = 120)
#> Warning: Second dive impossible in less than 12h after a dive a 60 more meters
plot(d, def_cols = TRUE, main = '60_no_sucess')
# Different dives d <- ndive(dive1 = dive(18,11), dive2 = dive(47,8), inter = 730) plot(d, def_cols = TRUE, main = 'diff cut')