[chronojump] 0.8.15.0



commit 6e93aa3debee6e182a77ca2515c5346f9589f5eb
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Dec 16 13:43:13 2009 +0100

    0.8.15.0
    fixed starting crash on detect version if no previous value on database
    added Histogram
    XY renamed "Dispersion" and added R^2
    IE,IUB now shown first index (better for single variable graphs)

 chronojump_server/bin/chronojumpServer.dll |  Bin 274944 -> 274944 bytes
 configure.ac                               |    2 +-
 src/chronojump.cs                          |   14 ++++++++++++--
 src/constants.cs                           |    5 +++--
 src/gui/stats.cs                           |    2 ++
 src/stats/graphs/ieIub.cs                  |    9 ++++-----
 src/stats/main.cs                          |   27 +++++++++++++++++++++++----
 7 files changed, 45 insertions(+), 14 deletions(-)
---
diff --git a/chronojump_server/bin/chronojumpServer.dll b/chronojump_server/bin/chronojumpServer.dll
index 68f29c5..3c4d29f 100755
Binary files a/chronojump_server/bin/chronojumpServer.dll and b/chronojump_server/bin/chronojumpServer.dll differ
diff --git a/configure.ac b/configure.ac
index 7264bcd..5353a41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 dnl Warning: This is an automatically generated file, do not edit!
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ([2.54])
-AC_INIT([chronojump], [0.8.14])
+AC_INIT([chronojump], [0.8.15])
 AM_INIT_AUTOMAKE([foreign])
 
 AC_CONFIG_MACRO_DIR([m4])
diff --git a/src/chronojump.cs b/src/chronojump.cs
index 517a348..a63fe65 100644
--- a/src/chronojump.cs
+++ b/src/chronojump.cs
@@ -280,8 +280,18 @@ Log.WriteLine("doing backup");
 		if( versionAvailable != Constants.ServerOffline && versionAvailable != progVersion ) {
 			//check if available version is higher than known available version
 			Version versionAvailableAsV = new Version(versionAvailable);
-			Version versionAvailableKnownAsV = new Version(versionAvailableKnown);
-			if(versionAvailableAsV > versionAvailableKnownAsV) {
+
+			Version versionAvailableKnownAsV;
+			bool updateKnownVersion = false;
+			if(versionAvailableKnown == "")
+				updateKnownVersion = true;
+			else {
+				versionAvailableKnownAsV = new Version(versionAvailableKnown);
+				if(versionAvailableAsV > versionAvailableKnownAsV)
+					updateKnownVersion = true;
+			}
+
+			if(updateKnownVersion) {
 				//is the first time we know about this new version
 				//just write on db and show message to user
 				SqlitePreferences.Update(Constants.PrefVersionAvailable, versionAvailable, false);
diff --git a/src/constants.cs b/src/constants.cs
index 26b024d..83a5700 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -241,11 +241,12 @@ public class Constants
 	public static string FileNameRScript = "r-graph.txt";
 	public static string GraphTypeBoxplot = "Boxplot";
 	public static string GraphTypeBarplot = "Barplot";
+	public static string GraphTypeHistogram = "Histogram";
 	public static string GraphTypeLines = "Lines";
-	public static string GraphTypeXY = "XY";
+	public static string GraphTypeXY = "Dispersion";
 	public static string GraphTypeDotchart = "Dotchart";
 	public static string GraphTypeStripchart = "Stripchart";
-	public static string [] GraphTypes = { GraphTypeBoxplot, GraphTypeBarplot, GraphTypeLines, 
+	public static string [] GraphTypes = { GraphTypeBoxplot, GraphTypeHistogram, GraphTypeBarplot, GraphTypeLines, 
 		GraphTypeXY, GraphTypeDotchart, GraphTypeStripchart };
 	public static string GraphPaletteGray = "gray.colors";
 	public static string GraphPaletteBlack = Catalog.GetString("black only");
diff --git a/src/gui/stats.cs b/src/gui/stats.cs
index 8ba72df..61c0254 100644
--- a/src/gui/stats.cs
+++ b/src/gui/stats.cs
@@ -443,6 +443,7 @@ public class StatsWindow {
 		if(
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeDotchart ||
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeBoxplot ||
+				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeHistogram ||
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeStripchart ||
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeXY)
 			showTransposed(false);
@@ -453,6 +454,7 @@ public class StatsWindow {
 		if(
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeBoxplot ||
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeStripchart ||
+				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeHistogram ||
 				UtilGtk.ComboGetActive(combo_graph_type) == Constants.GraphTypeDotchart) {
 			combo_graph_palette.Active = UtilGtk.ComboMakeActive(Constants.GraphPalettes, Constants.GraphPaletteBlack);
 			combo_graph_palette.Sensitive = false;
diff --git a/src/stats/graphs/ieIub.cs b/src/stats/graphs/ieIub.cs
index 74d1ada..f5afd30 100644
--- a/src/stats/graphs/ieIub.cs
+++ b/src/stats/graphs/ieIub.cs
@@ -82,14 +82,13 @@ public class GraphIeIub : StatIeIub
 			serieJump1 = new GraphSerie();
 			serieJump2 = new GraphSerie();
 				
-			//serieIndex.Title = Catalog.GetString("Index");
 			serieIndex.Title = indexType;
 			serieJump1.Title = jump1;
 			serieJump2.Title = jump2;
-			
-			serieIndex.IsLeftAxis = false;
-			serieJump1.IsLeftAxis = true;
-			serieJump2.IsLeftAxis = true;
+		
+			serieIndex.IsLeftAxis = true;
+			serieJump1.IsLeftAxis = false;
+			serieJump2.IsLeftAxis = false;
 
 			CurrentGraphData.LabelLeft = 
 				jump1 + " " + Catalog.GetString("TF") + "(s), " + 
diff --git a/src/stats/main.cs b/src/stats/main.cs
index 93a89f1..bac6637 100644
--- a/src/stats/main.cs
+++ b/src/stats/main.cs
@@ -913,8 +913,9 @@ public class Stat
 				}
 			}
 			
-			//Dotchart plots col 2
-			if(gro.Type == Constants.GraphTypeDotchart && gro.VarX != serie.Title)
+			//Histogram and Dotchart plot col 1
+			if( (gro.Type == Constants.GraphTypeHistogram || gro.Type == Constants.GraphTypeDotchart)
+					&& gro.VarX != serie.Title)
 				continue;
 
 
@@ -989,6 +990,7 @@ public class Stat
 				gro.Type != Constants.GraphTypeXY && 
 				gro.Type != Constants.GraphTypeDotchart &&
 				gro.Type != Constants.GraphTypeBoxplot &&
+				gro.Type != Constants.GraphTypeHistogram &&
 				gro.Type != Constants.GraphTypeStripchart
 				)
 			allData += "data <- t(data)\n";
@@ -1261,7 +1263,7 @@ public class Stat
 
 	private string getRXYString(GraphROptions gro, string fileName) {
 		string allData = convertDataToR(gro, Sides.ALL);
-		string titStr = getTitle("XY", "sub=paste('correlation:',cor(serie0,serie1))");
+		string titStr = getTitle(Catalog.GetString("Dispersion"), "sub=paste('correlation:',cor(serie0,serie1),'   R^2:',cor(serie0,serie1)^2)");
 		
 		string colors="colors";
 		bool changedPalette = false;
@@ -1301,11 +1303,26 @@ public class Stat
 		return allData + rG;
 	}
 
+	private string getRHistogramString(GraphROptions gro, string fileName) {
+		string allData = convertDataToR(gro, Sides.ALL);
+		string titStr = getTitle("Histogram","");
+		string rG = //rGraphString
+			
+			"hist(serie0, main='', xlab=colnames(data)[1], cex=1)\n" +
+			"abline(v=mean(serie0), lty=1, col='grey20')\n" +
+			"abline(v=median(serie0), 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" +
+			titStr;
+
+		return allData + rG;
+	}
+
 	private string getRDotchartString(GraphROptions gro, string fileName) {
 		string allData = convertDataToR(gro, Sides.ALL);
 		string titStr = getTitle("Dotchart","");
 		string rG = //rGraphString
-			"dotchart(serie0, labels=rownames(data), cex=1)\n" +
+			"dotchart(serie0, labels=rownames(data), xlab=colnames(data)[1], cex=1)\n" +
 			"abline(v=mean(serie0), lty=1, col='grey20')\n" +
 			"abline(v=median(serie0), lty=2, col='grey40')\n" +
 			"mtext('avg', at=mean(serie0), side=3, cex=.7, col='grey20')\n" +
@@ -1397,6 +1414,8 @@ public class Stat
 		}
 		else if(gRO.Type == Constants.GraphTypeXY)
 			rString += getRXYString(gRO, fileName);
+		else if(gRO.Type == Constants.GraphTypeHistogram)
+			rString += getRHistogramString(gRO, fileName);
 		else //if(CurrentGraphData.GraphType == Constants.GraphTypeDotchart))
 			rString += getRDotchartString(gRO, fileName);
 		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]