knitr::opts_chunk$set(echo = TRUE)
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")
This function includes plotting engine: "ggplot2","plotly".
chart.Boxplot(edhec, plot.engine = "plotly", main="demo")
chart.Boxplot(edhec, plot.engine = "ggplot2", main="demo")
This function includes plotting engine: "ggplot2","plotly","googlevis","dygraph"
chart.TimeSeries(edhec,plot.engine = "dygraph",main="demo")
chart.TimeSeries(edhec,plot.engine = "plotly",main="demo")
chart.TimeSeries(edhec,plot.engine = "ggplot2",main="demo")
This function includes plotting engine: plotly
,googlevis
,dygraph
, and ggplot2
chart.CumReturns(edhec,plot.engine = "dygraph",main="demo")
chart.CumReturns(edhec,plot.engine = "plotly",main="demo")
chart.CumReturns(edhec,plot.engine = "ggplot2",main="demo")
This function includes plotting engine: "ggplot2","plotly","googlevis","dygraph"
chart.Drawdown(edhec,plot.engine = "dygraph",main="demo")
chart.Drawdown(edhec,plot.engine = "plotly",main="demo")
chart.Drawdown(edhec,plot.engine = "ggplot2",main="demo")
This function includes plotting engine: "ggplot2","plotly"
charts.PerformanceSummary(edhec,plot.engine = "plotly",main="demo")
charts.PerformanceSummary(edhec,plot.engine = "ggplot2",main="demo")
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.