[R] barplot with varaible-width bars

2011-01-31 Thread Gould, A. Lawrence
Bill Pikounis provided a clever and elegant solution: in the program barplot.default, replace the statement width <- rep(width, NR) that occours around line 51 ( NR = nrow(height) ) with the statement width <- width. I renamed the program barplotX.fn and attached it to this ema

Re: [R] barplot with varaible-width bars

2011-01-26 Thread Bill Pikounis
Hi Larry, If I understand correctly, your barplot() call dispatches to the method function barplot.default() to do the work. Looking at the definition of that function and your specific call, it seems that around line 51 of barplot.default(), the value of the width argument is truncated: width <

[R] barplot with varaible-width bars

2011-01-25 Thread Gould, A. Lawrence
I would like to produce a bar plot with varying-width bars. Here is an example to illustrate: ww <- c(417,153,0.0216,0.0065,556,256,0.0162,0.0117, + 726,379,0.0358,0.0501,786,502,0.0496,0.0837, + 892,591,0.0785,0.0795) yy<-t(t(array(ww,c(2,10 barplot(yy[,2*1:5],las=1,space=c(.1,.5),beside