]> jspc29.x-matter.uni-frankfurt.de Git - coral.git/commitdiff
window length feature
authorMichael Wiebusch <antiquark@gmx.net>
Thu, 21 Aug 2014 12:27:02 +0000 (14:27 +0200)
committerMichael Wiebusch <antiquark@gmx.net>
Thu, 21 Aug 2014 12:27:02 +0000 (14:27 +0200)
user_interface/gui.pl
user_interface/plot.sh

index 8a6d441dd23bcc1dcf92c51ad97b5ce3ef36e834..75396979d83a0bf853d322d5f69f94a01b60a7dd 100755 (executable)
@@ -34,7 +34,7 @@ $hbox->set_border_width(3);
 ##################################################
 
 my $inc_button = Gtk2::Button->new('_Click Me');
-$hbox->pack_start($inc_button, FALSE, FALSE, 0);
+$hbox->pack_start($inc_button, FALSE, FALSE, 0);
 my $count = 1;
 
 my $plot_button = Gtk2::Button->new('_Plot');
@@ -43,11 +43,22 @@ $hbox->pack_start($plot_button, FALSE, FALSE, 0);
 my $clear_button = Gtk2::Button->new('_Clear');
 $hbox->pack_start($clear_button, FALSE, FALSE, 0);
 
+my $windowLength_entry = Gtk2::Entry->new;
+$hbox->pack_start($windowLength_entry, FALSE, FALSE, 0);
+
+my $setWindowLength_button = Gtk2::Button->new('_Set window length');
+$hbox->pack_start($setWindowLength_button, FALSE, FALSE, 0);
+
+
+
 my $quit_button = Gtk2::Button->new('_Quit');
-$hbox->pack_start($quit_button, FALSE, FALSE, 0);
+$hbox->pack_start($quit_button, FALSE, FALSE, 0);
 $quit_button->signal_connect( clicked => sub {
-               Gtk2->main_quit;
-       });
+            Gtk2->main_quit;
+    });
+
+
+
 
 
 my $image = Gtk2::Image->new_from_file ("plot.png");
@@ -57,8 +68,8 @@ $plot_frame->add($image);
 
 
 
-# my $label = Gtk2::Label->new('Clicked 0 times.');
-$vbox->pack_start($label, TRUE, TRUE, 0);
+my $label = Gtk2::Label->new('... debug out');
+$vbox->pack_start($label, TRUE, TRUE, 0);
 
 
 
@@ -93,7 +104,12 @@ $clear_button->signal_connect( clicked => sub {
   
 });
 
-
+$setWindowLength_button->signal_connect( clicked => sub {
+  my $windowLength = $windowLength_entry->get_text();
+  execute("./analyzer.pl --window $windowLength");
+#   $label->set_text($windowLength_entry->get_text());
+  
+});
 
 
 sub execute {
index a2f5b8f765121da646848df00495ab65e0531a31..772bac396c90c1c15e7b950bc28026c291ee00c9 100755 (executable)
@@ -9,6 +9,23 @@ set terminal png
 # set terminal postscript enhanced solid color
 set output "plot.png"
 #set xrange [$left:$right]
+
+
+set style line 1 lc rgb '#8b1a0e' pt 1 ps 1 lt 1 lw 2 # --- red
+set style line 2 lc rgb '#5e9c36' pt 6 ps 1 lt 1 lw 2 # --- green
+
+set style line 11 lc rgb '#808080' lt 1
+set border 3 back ls 11
+set tics nomirror
+
+set style line 12 lc rgb '#808080' lt 0 lw 1
+set grid back ls 12
+
+set xlabel "bins"
+set ylabel "counts"
+
+
 plot "out.dat" using 1:2
+
 EOF
 #display plot.png