[Xts-commits] r660 - pkg/xtsExtra/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 2 18:42:20 CEST 2012


Author: weylandt
Date: 2012-07-02 18:42:20 +0200 (Mon, 02 Jul 2012)
New Revision: 660

Modified:
   pkg/xtsExtra/R/barplot.R
Log:
Fixed bug in barplot spacing which manifested in axis ticks

Modified: pkg/xtsExtra/R/barplot.R
===================================================================
--- pkg/xtsExtra/R/barplot.R	2012-07-02 16:41:52 UTC (rev 659)
+++ pkg/xtsExtra/R/barplot.R	2012-07-02 16:42:20 UTC (rev 660)
@@ -56,7 +56,7 @@
   ep = axTicksByTime(x, major.ticks, format.labels = date.format)
   ep1 = ep
   
-  posn = barplot(coredata(x), plot=FALSE, space=space)
+  posn = barplot(t(x), plot=FALSE, space=space)
   if(!stacked) posn <- posn*nc
   
   # Vectorize this?
@@ -116,7 +116,6 @@
       xaxis.labels = names(ep1)
     else
       ep1 = 1:length(xaxis.labels)
-    
     axis(1, at=ep1, labels=xaxis.labels, las=las, lwd=1, mgp=c(3,label.height,0), cex.axis = cex.axis) 
     #axis(1, at = lab.ind, lab=rownames[lab.ind], cex.axis = cex.axis, col = elementcolor)
     #             title(xlab = xlab, cex = cex.lab)



More information about the Xts-commits mailing list