powered by
Plot the time series data beautifully with ggplot.
gglineplot(data, mapping, date_labels = "%Y/%m/%d", date_breaks = "2 weeks")
A ggplot figure of the time series
a tibble
the mapping parameter
the x label
the period of the x label
date <- as.Date("2015-01-01") + days(0:180) thero <- returns(rGbm("thero", date))[-1] tthero <- tibble(x = date[-1], y = thero) gglineplot(tthero, aes(x, y), "%Y/%m", "1 months")
Run the code above in your browser using DataLab