Creates a line plot of time series data using ggplot2, with each series represented by a different color.

esgplotts(x)

Arguments

x

A time series object (ts) containing the data to plot

Value

A ggplot2 object containing the line plot

Details

The function converts the time series data into a format suitable for ggplot2 plotting. Each column of the time series is plotted as a separate line with a different color. The x-axis represents time/maturity and the y-axis shows the values.

Examples

# Create sample time series data
x <- ts(matrix(rnorm(100), 20, 5), start = 0, deltat = 0.1)

# Plot the time series
esgplotts(x)
#> Warning: Use of `meltdf$value` is discouraged.
#>  Use `value` instead.