$p->{$name}->{type} or die "No plot type specified";
$p->{$name}->{output} or die "No destination specified";
$p->{$name}->{colors} = $p->{$name}->{colors} || \@color;
+ $p->{$name}->{showvalues} = $p->{$name}->{showvalues} || 0;
foreach my $i (0..($c->{entries}-1)) {
for my $j (0..($c->{curves}-1)) {
}
elsif($p->{$name}->{type} == TYPE_HEATMAP) {
plot_write($fh,"set view map");
- plot_write($fh,"splot '-' matrix with image");
+ plot_write($fh,"set palette rgbformulae 22,13,-31");
+ if ($p->{$name}->{showvalues} == 0) {
+ plot_write($fh,"splot '-' matrix with image");
+ }
+ else {
+ plot_write($fh,"plot '-' matrix with image, '-' matrix using 1:2:(sprintf('%i', \$3)) with labels tc rgb \"#ffffff\" font ',16'");
+ }
}
else {
die "Plot type not supported";
if($p->{$name}->{type} == TYPE_HEATMAP) {
- for(my $j=0; $j<$p->{$name}->{curves}; $j++) {
- for(my $i=0; $i< $p->{$name}->{entries}; $i++) {
- plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1);
+# for(my $s=0; $s<=$p->{$name}->{showvalues}; $s++) {
+ for(my $j=0; $j<$p->{$name}->{curves}; $j++) {
+ for(my $i=0; $i< $p->{$name}->{entries}; $i++) {
+ plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1);
+ }
+ plot_write($p->{$name}->{fh}," ",0);
}
- plot_write($p->{$name}->{fh}," ",0);
- }
- plot_write($p->{$name}->{fh},"e");
- plot_write($p->{$name}->{fh},"e");
+ plot_write($p->{$name}->{fh},"e");
+ plot_write($p->{$name}->{fh},"e");
+# }
+ for(my $j=0; $j<$p->{$name}->{curves}; $j++) {
+ for(my $i=0; $i< $p->{$name}->{entries}; $i++) {
+ plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1);
+ }
+ plot_write($p->{$name}->{fh}," ",0);
+ }
+ plot_write($p->{$name}->{fh},"e");
+ plot_write($p->{$name}->{fh},"e");
+
}
$plot2->{name} = "DiamondRate";
$plot2->{file} = "files/DiamondRate";
$plot2->{curves} = 1;
-$plot2->{entries} = 6;
-$plot2->{curves} = 6;
+$plot2->{entries} = 7;
+$plot2->{curves} = 7;
$plot2->{type} = HPlot::TYPE_HEATMAP;
$plot2->{output} = HPlot::OUT_PNG;
$plot2->{zlabel} = "Hitrate";
$plot2->{sizey} = 465;
$plot2->{nokey} = 1;
$plot2->{buffer} = 1;
-$plot2->{xmin} = -0.5;
-$plot2->{xmax} = 5.5;
-$plot2->{ymin} = -0.5;
-$plot2->{ymax} = 5.5;
+$plot2->{xmin} = 0.5;
+$plot2->{xmax} = 6.5;
+$plot2->{ymin} = 6.5;
+$plot2->{ymax} = 0.5;
+$plot2->{showvalues} = 1;
HPlot::PlotInit($plot2);
for my $x (0..5) {
for my $y (0..5) {
- HPlot::PlotFill('DiamondRate',$diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]],5-$y,$x);
+ HPlot::PlotFill('DiamondRate',$diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]],6-$y,6-$x);
}
}
HPlot::PlotDraw('DiamondRate');