View source: R/plot_2d_volume.R
plot_2d_volume | R Documentation |
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"
)
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. |
A ggplot object showing volume changes by segment over time.
# 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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.