knitr::opts_chunk$set(echo = TRUE)

Multiple Plotting Engine

The main purpose of this update is to add multiple plotting engines into the current plotting functions. Functions modified for now are: - chart.Boxplot - chart.TimeSeries - chart.CumReturns - chart.Drawdown - charts.PerformanceSummary

The engines added onto the functions are: - ggplot2 (plot.engine = "ggplot2") - dygraphPlot (plot.engine = "dygraph") - googleVis (plot.engine = "googlevis") - plotly (plotly)

A demo of different plot engines in different functions will be shown as below:

library(PerformanceAnalytics)
library(xts)
library(zoo)
library(ggplot2)
library(plotly)
library(dygraphs)
library(googleVis)
library(gridExtra)

data("edhec")

chart.Boxplot

This function includes plotting engine: "ggplot2","plotly".

plotly

chart.Boxplot(edhec, plot.engine = "plotly", main="demo")

ggplot2

chart.Boxplot(edhec, plot.engine = "ggplot2", main="demo")

chart.TimeSeries

This function includes plotting engine: "ggplot2","plotly","googlevis","dygraph"

dygraphPlot

chart.TimeSeries(edhec,plot.engine = "dygraph",main="demo")

plotly

chart.TimeSeries(edhec,plot.engine = "plotly",main="demo")

ggplot2

chart.TimeSeries(edhec,plot.engine = "ggplot2",main="demo")

chart.CumReturns

This function includes plotting engine: plotly,googlevis,dygraph, and ggplot2

dygraphPlot

chart.CumReturns(edhec,plot.engine = "dygraph",main="demo")

plotly

chart.CumReturns(edhec,plot.engine = "plotly",main="demo")

ggplot2

chart.CumReturns(edhec,plot.engine = "ggplot2",main="demo")

chart.Drawdown

This function includes plotting engine: "ggplot2","plotly","googlevis","dygraph"

dygraphPlot

chart.Drawdown(edhec,plot.engine = "dygraph",main="demo")

plotly

chart.Drawdown(edhec,plot.engine = "plotly",main="demo")

ggplot2

chart.Drawdown(edhec,plot.engine = "ggplot2",main="demo")

charts.PerformanceSummary

This function includes plotting engine: "ggplot2","plotly"

plotly

charts.PerformanceSummary(edhec,plot.engine = "plotly",main="demo")

ggplot2

charts.PerformanceSummary(edhec,plot.engine = "ggplot2",main="demo")


braverock/PerformanceAnalytics documentation built on Feb. 16, 2024, 5:37 a.m.