From 7f97041875f307a4e8aa40867bb5e254eebbabff Mon Sep 17 00:00:00 2001 From: rpoplin Date: Wed, 13 Jan 2010 20:26:31 +0000 Subject: [PATCH] Update to AnalyzeCovariates to make the histogram of PairedReadOrder look a little nicer git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2575 348d0f76-0448-11de-a6fe-93d51630548a --- R/plot_residualError_OtherCovariate.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/plot_residualError_OtherCovariate.R b/R/plot_residualError_OtherCovariate.R index 1b626d3a5..94072801b 100644 --- a/R/plot_residualError_OtherCovariate.R +++ b/R/plot_residualError_OtherCovariate.R @@ -98,7 +98,11 @@ if( is.numeric(c$Covariate) ) { } else { # Dinuc (and other non-numeric covariates) are different to make their plots look nice hst=subset(data.frame(c$Covariate, c$nBases), c.nBases != 0) plot(1:length(hst$c.Covariate), hst$c.nBases, type="h", lwd=lwdSize, main=paste(covariateName,"histogram"), ylim=c(0, max(hst$c.nBases)),xlab=covariateName, ylab="Number of Bases",yaxt="n",xaxt="n") - axis(1, at=seq(1,length(hst$c.Covariate),2), labels = hst$c.Covariate[seq(1,length(hst$c.Covariate),2)]) + if( length(hst$c.Covariate) > 9 ) { + axis(1, at=seq(1,length(hst$c.Covariate),2), labels = hst$c.Covariate[seq(1,length(hst$c.Covariate),2)]) + } else { + axis(1, at=seq(1,length(hst$c.Covariate),1), labels = hst$c.Covariate) + } axis(2,axTicks(2), format(axTicks(2), scientific=F)) } dev.off() \ No newline at end of file