[Xts-commits] r667 - pkg/xtsExtra/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 3 04:58:22 CEST 2012
Author: weylandt
Date: 2012-07-03 04:58:22 +0200 (Tue, 03 Jul 2012)
New Revision: 667
Modified:
pkg/xtsExtra/R/plot.R
Log:
Made candle widths for OHLC-plot.xts dynamic so as to avoid malformed (top-heavy or too-skinny) candles
Modified: pkg/xtsExtra/R/plot.R
===================================================================
--- pkg/xtsExtra/R/plot.R 2012-07-03 02:51:04 UTC (rev 666)
+++ pkg/xtsExtra/R/plot.R 2012-07-03 02:58:22 UTC (rev 667)
@@ -396,7 +396,7 @@
# Better to do this with xts:::Op etc when moved to xts package
# Candles -- not happy about lwd fixed: make dynamic / smart?
- if(candles) segments(.index(x), x[,2L], .index(x), x[,3L], col = candle.col)
+ if(candles) rect(.index(x) - width/4, x[,2L], .index(x) + width/4, x[,3L], col = candle.col)
# Bars for all OHLC
rect(.index(x) - width, x[, 1L], .index(x) + width, x[, 4L],
More information about the Xts-commits
mailing list