plotly_stressprofile_vertical: Plotly vertical stress profiles

View source: R/stress_profiles_vertical.R

plotly_stressprofile_verticalR Documentation

Plotly vertical stress profiles

Description

Plots an interactive graph using plotly to show how soil stresses change with depth

Usage

plotly_stressprofile_vertical(
  df,
  traces = c("sigma_v", "u", "sigma'_v"),
  line_colour = c("#000000", "#0000ff", "#ff0000"),
  line_type = c("solid", "dash", "dot"),
  line_width = 1.5,
  mode = "lines+markers",
  labelmode = "calculations",
  hovermode = "y",
  ylab = "Depth [m]",
  xlim = c(0, NA),
  ylim = c(NA, NA),
  nround = 2
)

Arguments

df

dataframe with all depths, stresses etc, outputted from the function 'vertical_stress_profile()'

traces

array with traces to be plotted. May contain 'sigma_v' for the total vertical stress, ‘u' for the pore water pressure and 'sigma’_v' for the vertical effective stress

line_colour

array with colors for total stress, pore water pressure and effective stress traces

line_type

array with linetypes for total stress, pore water pressure and effective stress traces

line_width

line thickness for trace

mode

plotly argument 'mode' for each trace. Use 'lines+markers' to plot both lines and markers, or 'lines' to only plot lines etc

labelmode

setting controlling what hoverlabels to plot. If 'stressonly', only the values of stresses are displaced. If 'calculations', it is also shown how to calculate the stress based on the stress value in other points

hovermode

hovermode to use in plotly

ylab

y-axis label for depth

xlim

stress axis limits (manual override)

ylim

depth axis limits (manual override)

nround

number of digits to use in rounding stress values in plotly hoverlabels

Examples

df <- vertical_stress_profile(
  z_soil = c(0, 4),
  gamma_b = c(17, 20),
  q = 10,
  z_watertable = 2
)
plotly_stressprofile_vertical(df)

GJMeijer/soilmech documentation built on May 22, 2022, 10:39 a.m.