xs_plot: Plot cross section profile

View source: R/xs_plot.R

xs_plotR Documentation

Plot cross section profile

Description

Produces a cross section profile plot for the specified cross section and displayes the specified bankfull elevation.

Usage

xs_plot(xs_points, stream, xs_number, bankfull_elevation)

Arguments

xs_points

data frame; a data frame of cross section points

stream

character; The name of the stream.

xs_number

integer; The cross section identifier of the requested cross section.

bankfull_elevation

numeric; The detrended bankfull elevation (in feet) that is used to calculate hydraulic geometry.

Details

This function is used to plot the cross section profile from a xs_points data frame.

Value

A ggplot2 object.

See Also

The xs_plot function requires a xs_points dataframe. See the sin_xs_points package dataset for an example of this format of cross section data produced by the FluvialGeomorph ArcGIS toolbox.

Examples

# Extract attribute data from the fluvgeo::sin_riffle_channel_points_sf
# sf data frame
sin_xs_points_df <- fluvgeo::sin_riffle_channel_points_sf

# Call the xs_plot function
sin_4_plot <- xs_plot(xs_points = sin_xs_points_df,
                      stream = "Sinsinawa",
                      xs_number = 4,
                      bankfull_elevation = 103.5)
# Print the graph
sin_4_plot


FluvialGeomorph/fluvgeo documentation built on April 12, 2024, 5:35 p.m.