[Returnanalytics-commits] r3176 - pkg/PortfolioAnalytics/sandbox/symposium2013/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 24 02:56:00 CEST 2013


Author: peter_carl
Date: 2013-09-24 02:56:00 +0200 (Tue, 24 Sep 2013)
New Revision: 3176

Modified:
   pkg/PortfolioAnalytics/sandbox/symposium2013/R/chart.UnStackedBar.R
Log:
- not fully functionalized, tweaking parameters


Modified: pkg/PortfolioAnalytics/sandbox/symposium2013/R/chart.UnStackedBar.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/symposium2013/R/chart.UnStackedBar.R	2013-09-24 00:40:14 UTC (rev 3175)
+++ pkg/PortfolioAnalytics/sandbox/symposium2013/R/chart.UnStackedBar.R	2013-09-24 00:56:00 UTC (rev 3176)
@@ -12,16 +12,16 @@
   rotate = rotate[1]
   row.names = sapply(rownames(w), function(x) paste(strwrap(x,10), collapse = "\n"), USE.NAMES=FALSE)
   if(rotate=="vertical"){
-    par(oma = c(4,8,2,1), mar=c(0,0,0,1)) # c(bottom, left, top, right)
+    par(oma = c(4,8,2,1), mar=c(0,1,0,1)) # c(bottom, left, top, right)
     layout(matrix(c(1:NCOL(w)), nr = 1, byrow = TRUE))
     for(i in 1:NCOL(w)){
       if(i==1){
-        barplot(w[,i], col=colorset[i], horiz=TRUE, xlim=c(0,max(w)), axes=FALSE, names.arg=row.names, las=2, cex.names=1.5)
+        barplot(w[,i], col=colorset[i], horiz=TRUE, xlim=c(0,max(w)), axes=FALSE, names.arg=row.names, las=2, cex.names=1)
         abline(v=0, col="darkgray")
         if(equal.line)
           abline(v=1/NROW(w), col="darkgray", lty=2)
         axis(1, cex.axis = 1, col = "darkgray", las=1)
-        mtext(colnames(w)[i], side= 3, cex=1, adj=0.5)
+        mtext(colnames(w)[i], side= 3, cex=0.8, adj=0.5)
       } 
       else{
         barplot(w[,i], col=colorset[i], horiz=TRUE, xlim=c(0,max(w)), axes=FALSE, names.arg="", ylab=colnames(w)[i])
@@ -30,7 +30,7 @@
           abline(v=1/NROW(w), col="darkgray", lty=2)
         if(yaxis)
           axis(1, cex.axis = 1, col = "darkgray", las=1)
-        mtext(colnames(w)[i], side= 3, cex=1, adj=0.5)
+        mtext(colnames(w)[i], side= 3, cex=0.8, adj=0.5)
       }
     }
   }



More information about the Returnanalytics-commits mailing list