[chronojump] Fixed bug: now multissesion stats don't plot missing values as 0
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed bug: now multissesion stats don't plot missing values as 0
- Date: Mon, 21 Feb 2011 14:27:28 +0000 (UTC)
commit b4c0fbdc38a4d7fbbb6c65bd6de1385a5b7d7448
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Feb 21 15:26:21 2011 +0100
Fixed bug: now multissesion stats don't plot missing values as 0
src/stats/main.cs | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 5dcfc72..b7fdcbc 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -940,7 +940,7 @@ public class Stat
continue;
if(val == "-")
- rD += sep + "0";
+ rD += sep + "NA";
else
rD += sep + Util.ConvertToPoint(val);
sep = ", ";
@@ -1175,9 +1175,7 @@ public class Stat
ylabStr = ", ylab='" + Util.RemoveTilde(CurrentGraphData.LabelLeft) + "'";
}
- string naString = "";
- if(isRjEvolution)
- naString = ", na.rm = TRUE";
+ string naString = ", na.rm = TRUE";
string xlimString = "c(0,length(colnames(data))+1)";
if(isRjEvolution)
@@ -1308,10 +1306,10 @@ public class Stat
string rG = //rGraphString
"hist(serie0, main='', lwd="+ gro.LineWidth +", xlab=colnames(data)[1], cex=1)\n" +
- "abline(v=mean(serie0), lwd="+ gro.LineWidth +", lty=1, col='grey20')\n" +
- "abline(v=median(serie0), lwd="+ gro.LineWidth +", lty=2, col='grey40')\n" +
- "mtext('avg', at=mean(serie0), side=3, cex=.7, col='grey20')\n" +
- "mtext('median', at=median(serie0), side=1, cex=.7, col='grey40')\n" +
+ "abline(v=mean(serie0, na.rm=T), lwd="+ gro.LineWidth +", lty=1, col='grey20')\n" +
+ "abline(v=median(serie0, na.rm=T), lwd="+ gro.LineWidth +", lty=2, col='grey40')\n" +
+ "mtext('avg', at=mean(serie0, na.rm=T), side=3, cex=.7, col='grey20')\n" +
+ "mtext('median', at=median(serie0, na.rm=T), side=1, cex=.7, col='grey40')\n" +
titStr;
return allData + rG;
@@ -1322,10 +1320,10 @@ public class Stat
string titStr = getTitle("Dotchart","");
string rG = //rGraphString
"dotchart(serie0, labels=rownames(data), xlab=colnames(data)[1], lwd="+ gro.LineWidth +", cex=1)\n" +
- "abline(v=mean(serie0), lwd="+ gro.LineWidth +", lty=1, col='grey20')\n" +
- "abline(v=median(serie0), lwd="+ gro.LineWidth +", lty=2, col='grey40')\n" +
- "mtext('avg', at=mean(serie0), side=3, cex=.7, col='grey20')\n" +
- "mtext('median', at=median(serie0), side=1, cex=.7, col='grey40')\n" +
+ "abline(v=mean(serie0, na.rm=T), lwd="+ gro.LineWidth +", lty=1, col='grey20')\n" +
+ "abline(v=median(serie0, na.rm=T), lwd="+ gro.LineWidth +", lty=2, col='grey40')\n" +
+ "mtext('avg', at=mean(serie0, na.rm=T), side=3, cex=.7, col='grey20')\n" +
+ "mtext('median', at=median(serie0, na.rm=T), side=1, cex=.7, col='grey40')\n" +
titStr;
return allData + rG;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]