plot_2d_volume function

Plot Volume Changes by Segment Over Time

Plot Volume Changes by Segment Over Time

This function generates a ggplot to display the volume changes by segment over time. It creates a line plot with each segment's volume on the y-axis and the timeframe on the x-axis.

plot_2d_volume( volume_data, segment_names = "Segment", title = "Volume Change by Segment" )

Arguments

  • volume_data: A data frame with volume measurements, one column per segment, and a "frame" column for time.
  • segment_names: Column that contain name of segment to plot
  • title: Optional plot title.

Returns

A ggplot object showing volume changes by segment over time.

Examples

# Example usage with random volume data set.seed(123) volume_data <- data.frame( Timeframe = 1:100, Volume = runif(100, min = 100, max = 150), Segment = 'UL' ) plot_2d_volume(volume_data, segment_names = 'Segment')
  • Maintainer: Wai-Hang Kwong
  • License: MIT + file LICENSE
  • Last published: 2025-01-24

Useful links