The plot initially has descending depth on y-axis and ascending variable
(e.g., Temperature) on x-axis with each line representing a unique CTD cast
across each depth recorded. If the plot is interactive, then on hover the CTD
cast (uniquely identified by cast_count) is highlighted in red and others
dimmed in gray.
Arguments
- df
data frame with columns:
cast_count,depth_m,v- variable
variable (character), should be one of
plot_titlefromget_variables(); default:"Temperature"- interactive
whether to render interactive plot; default:
TRUE
Value
interactive plot of type plotly::ggplotly() or static plot of type
ggplot2::ggplot().
Examples
# plot depth with the station data
plot_depth(df = bottle_temp_depth, variable = "Temperature")
#> Warning: `get_variables()` was deprecated in calcofi4r 1.1.0.
#> ℹ Please use `cc_list_measurement_types()` instead.
#> ℹ The CalCOFI API is being phased out. Use DuckDB access via cc_get_db()
#> instead.
#> ℹ The deprecated feature was likely used in the calcofi4r package.
#> Please report the issue at <https://github.com/calcofi/calcofi4r/issues>.
#> Error in req_perform(request("https://api.calcofi.io/variables")): HTTP 502 Bad Gateway.