[R-gregmisc-users] SF.net SVN: r-gregmisc: [1139] trunk/gplots/R/balloonplot.R
Brought to you by:
warnes
From: <wa...@us...> - 2007-08-14 18:13:27
|
Revision: 1139 http://r-gregmisc.svn.sourceforge.net/r-gregmisc/?rev=1139&view=rev Author: warnes Date: 2007-08-14 11:11:33 -0700 (Tue, 14 Aug 2007) Log Message: ----------- Correct balloonplot.default to properly show specified x and y axis labels when explicitly provided Modified Paths: -------------- trunk/gplots/R/balloonplot.R Modified: trunk/gplots/R/balloonplot.R =================================================================== --- trunk/gplots/R/balloonplot.R 2007-08-12 03:22:50 UTC (rev 1138) +++ trunk/gplots/R/balloonplot.R 2007-08-14 18:11:33 UTC (rev 1139) @@ -65,12 +65,6 @@ else ynames <- names(y) - if(missing(xlab)) - xlab <- paste( xnames, collapse=", " ) - - if(missing(ylab)) - ylab <- paste( ynames, collapse=", " ) - #### ## Handle arguments #### @@ -358,26 +352,46 @@ #### ## Column headers for row labels #### - text( - x=((1:length(ylabs))-0.5)*rowmar-0.5, - y=ny+0.5, - labels=ynames, - srt=colsrt, - font=2, - adj=c(0.5,0.0) - ) + if(missing(ylab)) + text( + x=((1:length(ylabs))-0.5)*rowmar-0.5, + y=ny+0.5, + labels=ynames, + srt=colsrt, + font=2, + adj=c(0.5,0.0) + ) + else + text( + x=((1:length(ylab))-0.5)*rowmar-0.5, + y=ny+0.5, + labels=ylab, + srt=colsrt, + font=2, + adj=c(0.5,0.0) + ) #### ## Row headers for column labels #### - text( - x= nlabels.y*rowmar - 0.25 - strwidth(','), - y= ny + 0.75 + ((nlabels.x:1) - 1 + .5)*colmar, - labels=xnames, - srt=colsrt, - font=2, - adj=c(1,0.5) - ) + if(missing(xlab)) + text( + x= nlabels.y*rowmar - 0.25 - strwidth(','), + y= ny + 0.75 + ((nlabels.x:1) - 1 + .5)*colmar, + labels=xnames, + srt=colsrt, + font=2, + adj=c(1,0.5) + ) + else + text( + x= nlabels.y*rowmar - 0.25 - strwidth(','), + y= ny + 0.75 + ((length(xlab):1) - 1 + .5)*colmar, + labels=xlab, + srt=colsrt, + font=2, + adj=c(1,0.5) + ) ### ## add borders to row and column headers This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |