[Returnanalytics-commits] r3340 - pkg/PerformanceAnalytics/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Feb 26 01:20:00 CET 2014
Author: peter_carl
Date: 2014-02-26 01:20:00 +0100 (Wed, 26 Feb 2014)
New Revision: 3340
Modified:
pkg/PerformanceAnalytics/R/chart.Boxplot.R
Log:
- really a reversion back to rev 2163 with hardcoded horizontal arg
- anticipating future improvements that will make this work better
Modified: pkg/PerformanceAnalytics/R/chart.Boxplot.R
===================================================================
--- pkg/PerformanceAnalytics/R/chart.Boxplot.R 2014-02-25 23:46:31 UTC (rev 3339)
+++ pkg/PerformanceAnalytics/R/chart.Boxplot.R 2014-02-26 00:20:00 UTC (rev 3340)
@@ -12,7 +12,6 @@
#'
#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
#' asset returns
-#' @param horizontal TRUE/FALSE plot horizontal (TRUE) or vertical (FALSE)
#' @param names logical. if TRUE, show the names of each series
#' @param as.Tufte logical. default FALSE. if TRUE use method derived for Tufte
#' for limiting chartjunk
@@ -49,7 +48,7 @@
#'
#' @export
chart.Boxplot <-
-function (R, horizontal = TRUE, names = TRUE, as.Tufte = FALSE, sort.by = c(NULL, "mean", "median", "variance"), colorset = "black", symbol.color = "red", mean.symbol = 1, median.symbol = "|", outlier.symbol = 1, show.data = NULL, add.mean = TRUE, sort.ascending = FALSE, xlab="Return", main = "Return Distribution Comparison", element.color = "darkgray", ...)
+function (R, names = TRUE, as.Tufte = FALSE, sort.by = c(NULL, "mean", "median", "variance"), colorset = "black", symbol.color = "red", mean.symbol = 1, median.symbol = "|", outlier.symbol = 1, show.data = NULL, add.mean = TRUE, sort.ascending = FALSE, xlab="Return", main = "Return Distribution Comparison", element.color = "darkgray", ...)
{ # @author Peter Carl
# DESCRIPTION:
@@ -109,10 +108,10 @@
) # end switch
if(as.Tufte){
- boxplot(R[,column.order], horizontal = horizontal, names = names, main = main, xlab = xlab, ylab = "", pars = list(boxcol = "white", medlty = "blank", medpch = median.symbol, medlwd = 2, medcex = .8, medcol = colorset[column.order], whisklty = c(1,1), whiskcol = colorset[column.order], staplelty = "blank", outpch = outlier.symbol, outcex = .5, outcol = colorset[column.order] ), axes = FALSE, ...)
+ boxplot(R[,column.order], horizontal = TRUE, names = names, main = main, xlab = xlab, ylab = "", pars = list(boxcol = "white", medlty = "blank", medpch = median.symbol, medlwd = 2, medcex = .8, medcol = colorset[column.order], whisklty = c(1,1), whiskcol = colorset[column.order], staplelty = "blank", outpch = outlier.symbol, outcex = .5, outcol = colorset[column.order] ), axes = FALSE, ...)
}
else{
- boxplot(R[,column.order], horizontal = horizontal, names = names, main = main, xlab = xlab, ylab = "", pars = list(boxcol = colorset[column.order], medlwd = 1, medcol = colorset[column.order], whisklty = c(1,1), whiskcol = colorset[column.order], staplelty = 1, staplecol = colorset[column.order], staplecex = .5, outpch = outlier.symbol, outcex = .5, outcol = colorset[column.order] ), axes = FALSE, boxwex=.6, ...)
+ boxplot(R[,column.order], horizontal = TRUE, names = names, main = main, xlab = xlab, ylab = "", pars = list(boxcol = colorset[column.order], medlwd = 1, medcol = colorset[column.order], whisklty = c(1,1), whiskcol = colorset[column.order], staplelty = 1, staplecol = colorset[column.order], staplecex = .5, outpch = outlier.symbol, outcex = .5, outcol = colorset[column.order] ), axes = FALSE, boxwex=.6, ...)
} # end else
if(!is.null(show.data)) {
More information about the Returnanalytics-commits
mailing list