diff -Naur old/droplist.c new/droplist.c
--- old/droplist.c 2008-05-21 11:21:14.776020534 +0200
+++ new/droplist.c 2008-05-21 11:30:16.608465070 +0200
@@ -31,6 +31,8 @@
GtkWidget *errorbarscheck;
GtkWidget *gridcheck;
GtkWidget *enhancedmodecheck;
+ GtkWidget *logscaleycheck;
+ GtkWidget *logscalexcheck;
GtkWidget *titleentry;
GtkWidget *xlabelentry;
GtkWidget *ylabelentry;
@@ -196,6 +198,9 @@
droplist.errorbarscheck = glade_xml_get_widget (xml, "ShowErrorbars");
droplist.gridcheck = glade_xml_get_widget (xml, "ShowGrid");
droplist.enhancedmodecheck = glade_xml_get_widget (xml, "EnableSuperSubScripts");
+ droplist.logscaleycheck = glade_xml_get_widget (xml, "EnableLogscaleY");
+ droplist.logscalexcheck = glade_xml_get_widget (xml, "EnableLogscaleX");
+
droplist.xlabelentry = glade_xml_get_widget (xml, "XLabel");
droplist.ylabelentry = glade_xml_get_widget (xml, "YLabel");
@@ -369,6 +374,10 @@
GTK_TOGGLE_BUTTON (droplist.gridcheck));
data->enhancedmode = gtk_toggle_button_get_active (
GTK_TOGGLE_BUTTON (droplist.enhancedmodecheck));
+ data->logscaley = gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON (droplist.logscaleycheck));
+ data->logscalex = gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON (droplist.logscalexcheck));
// Captions
data->xlabel = gtk_entry_get_text (GTK_ENTRY (droplist.xlabelentry));
diff -Naur old/droplist.glade new/droplist.glade
--- old/droplist.glade 2008-05-21 11:14:41.571894595 +0200
+++ new/droplist.glade 2008-05-21 11:20:32.068524240 +0200
@@ -962,6 +962,52 @@
+
+
+
+ True
+ Use logarithmic scaling for the y-axis
+ True
+ Enable logarithmic y-axis
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ 2
+ 5
+ 6
+ fill
+
+
+
+
+
+
+ True
+ Use logarithmic scaling for the x-axis
+ True
+ Enable logarithmic x-axis
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ 2
+ 6
+ 7
+ fill
+
+
+
diff -Naur old/gnuplot.c new/gnuplot.c
--- old/gnuplot.c 2008-05-21 11:34:34.589273819 +0200
+++ new/gnuplot.c 2008-05-21 11:40:40.716347999 +0200
@@ -140,6 +140,12 @@
fprintf (plotscript, "set title \"%s\"\n", escaped);
g_free (escaped);
}
+
+ // Logscales
+ if (data->logscaley)
+ fprintf (plotscript, "set logscale y\n");
+ if (data->logscalex)
+ fprintf (plotscript, "set logscale x\n");
if (data->zeroaxis)
fprintf (plotscript, "set zeroaxis\n");
@@ -149,7 +155,7 @@
if (data->extra)
fprintf (plotscript, "%s\n", data->extra);
-
+
char *plotcommand = "plot ";
fprintf (plotscript, "%s", plotcommand);
@@ -170,7 +176,7 @@
if (data->ymaxset)
fprintf (plotscript, "%f", data->ymax);
fprintf (plotscript, "]");
-
+
// For cycling through point types "with points pt %d"
int ptcounter = 0;
diff -Naur old/plotdata.h new/plotdata.h
--- old/plotdata.h 2008-05-21 11:29:03.812647277 +0200
+++ new/plotdata.h 2008-05-21 11:29:20.045970819 +0200
@@ -27,6 +27,8 @@
unsigned int xminset, xmaxset, yminset, ymaxset;
char *extra;
unsigned int enhancedmode;
+ unsigned int logscaley;
+ unsigned int logscalex;
} plotdata;
typedef enum {