##################################################
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');
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");
-# 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);
});
-
+$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 {
# 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