titles => ['3.3V','2.56V','1.16V/1.26V'],
type => HPlot::TYPE_BARGRAPH,
output => HPlot::OUT_PNG,
- xlabel => "Board",
+ xlabel => "DiRich/Combiner Board #",
ylabel => "Voltage (mV diff to nom)",
sizex => 400,
sizey => 200,
buffer => 0,
bargap => 0.4,
curvewidth => 1,
+ additional => "
+ set obj 1 rect from -1, -500 to 2000, 0 fc rgb '#ffbbbb' behind lc rgb '#01000000'\n
+ set obj 2 rect from -1, 0 to 2000, 100 fc rgb '#ddffdd' behind \n
+ set obj 3 rect from -1, 100 to 2000, 1000 fc rgb '#ffffbb' behind \n"
});
-
+# set object 2 rect from 1,3 to 2,4 lw 5 fs empty border lc rgb '#880088'
HPlot::PlotInit({
name => "PowerVolt",
file => Dmon::DMONDIR.'PowerVolt',
titles => ['3.36V','2.56V','1.26V','1.16V'],
type => HPlot::TYPE_BARGRAPH,
output => HPlot::OUT_PNG,
- xlabel => "Board",
+ xlabel => "PowerBoard #",
ylabel => "Voltage (mV diff to nom)",
sizex => 400,
sizey => 200,
buffer => 0,
bargap => 0.4,
curvewidth => 1,
+ additional => "
+ set obj 1 rect from -1, -500 to 2000, 0 fc rgb '#ffbbbb' behind \n
+ set obj 2 rect from -1, 0 to 2000, 100 fc rgb '#ddffdd' behind \n
+ set obj 3 rect from -1, 100 to 2000, 1000 fc rgb '#ffffbb' behind\n"
});
HPlot::PlotInit({
file => Dmon::DMONDIR.'PowerCurr',
curves => 4,
entries => 20,
- titles => ['1.1V','1.2V','2.5V','3.3V'],
+ titles => ['3.3V','2.5V','1.2V','1.1V'],
type => HPlot::TYPE_BARGRAPH,
output => HPlot::OUT_PNG,
- xlabel => "Board",
+ xlabel => "PowerBoard #",
ylabel => "Current (mA)",
sizex => 400,
sizey => 200,
-# ymin => '*<-50',
+ ymin => '0',
# ymax => '200<*',
countup => 1,
xscale => 1,
file => Dmon::DMONDIR.'PowerPower',
curves => 4,
entries => 20,
- titles => ['1.1V','1.2V','2.5V','3.3V'],
+ titles => ['3.3V','2.5V','1.2V','1.1V'],
type => HPlot::TYPE_BARGRAPH,
output => HPlot::OUT_PNG,
- xlabel => "Board",
+ xlabel => "PowerBoard #",
ylabel => "Power (W)",
sizex => 400,
sizey => 200,
# print Dumper $ret;
my $longtext = '';
- foreach my $m (keys %{$ret->[1][0]}) {
+ foreach my $m (sort keys %{$ret->[1][0]}) {
HPlot::PlotAdd('DiRichVolt',$ret->[1][0]{$m}-3300,0);
HPlot::PlotAdd('DiRichVolt',$ret->[1][1]{$m}-2560,1);
HPlot::PlotAdd('DiRichVolt',$ret->[1][2]{$m}-1160,2);
}
- foreach my $m (keys %{$ret->[2][0]}) {
+ foreach my $m (sort keys %{$ret->[2][0]}) {
HPlot::PlotAdd('DiRichVolt',$ret->[2][0]{$m}-3300,0);
HPlot::PlotAdd('DiRichVolt',$ret->[2][1]{$m}-2560,1);
HPlot::PlotAdd('DiRichVolt',$ret->[2][2]{$m}-1260,2);
HPlot::PlotLimitEntries('DiRichVolt',(scalar keys %{$ret->[1][0]}) + (scalar keys %{$ret->[2][0]}));
HPlot::PlotDraw('DiRichVolt');
- foreach my $m (keys %{$ret->[3][0]}) {
+ foreach my $m (sort keys %{$ret->[3][0]}) {
HPlot::PlotAdd('PowerVolt',$ret->[3][0]{$m}-3360,0);
HPlot::PlotAdd('PowerVolt',$ret->[3][1]{$m}-2560,1);
HPlot::PlotAdd('PowerVolt',$ret->[3][2]{$m}-1260,2);
HPlot::PlotLimitEntries('PowerVolt',(scalar keys %{$ret->[3][0]}));
HPlot::PlotDraw('PowerVolt');
- foreach my $m (keys %{$ret->[4][0]}) {
- HPlot::PlotAdd('PowerCurr',$ret->[4][0]{$m},0);
- HPlot::PlotAdd('PowerCurr',$ret->[4][1]{$m},1);
- HPlot::PlotAdd('PowerCurr',$ret->[4][2]{$m},2);
- HPlot::PlotAdd('PowerCurr',$ret->[4][3]{$m},3);
+ foreach my $m (sort keys %{$ret->[4][0]}) {
+ HPlot::PlotAdd('PowerCurr',$ret->[4][3]{$m},0);
+ HPlot::PlotAdd('PowerCurr',$ret->[4][2]{$m},1);
+ HPlot::PlotAdd('PowerCurr',$ret->[4][1]{$m},2);
+ HPlot::PlotAdd('PowerCurr',$ret->[4][0]{$m},3);
}
HPlot::PlotLimitEntries('PowerCurr',(scalar keys %{$ret->[4][0]}));
HPlot::PlotDraw('PowerCurr');
- foreach my $m (keys %{$ret->[4][0]}) {
- HPlot::PlotAdd('PowerPower',$ret->[4][0]{$m} * $ret->[3][3]{$m}/1e6,0);
- HPlot::PlotAdd('PowerPower',$ret->[4][1]{$m} * $ret->[3][2]{$m}/1e6,1);
- HPlot::PlotAdd('PowerPower',$ret->[4][2]{$m} * $ret->[3][1]{$m}/1e6,2);
- HPlot::PlotAdd('PowerPower',$ret->[4][3]{$m} * $ret->[3][0]{$m}/1e6,3);
+ foreach my $m (sort keys %{$ret->[4][0]}) {
+ HPlot::PlotAdd('PowerPower',$ret->[4][3]{$m} * $ret->[3][0]{$m}/1e6,0);
+ HPlot::PlotAdd('PowerPower',$ret->[4][2]{$m} * $ret->[3][1]{$m}/1e6,1);
+ HPlot::PlotAdd('PowerPower',$ret->[4][1]{$m} * $ret->[3][2]{$m}/1e6,2);
+ HPlot::PlotAdd('PowerPower',$ret->[4][0]{$m} * $ret->[3][3]{$m}/1e6,3);
}
HPlot::PlotLimitEntries('PowerPower',(scalar keys %{$ret->[4][0]}));
HPlot::PlotDraw('PowerPower');
return unless $str;
if($no || 0) {
print $file $str;
-# print $str;
+# print $str;
}
else {
print $file $str."\n";
-# print $str."\n";
+# print $str."\n";
}
if(defined $save) {$plotstring->{$save} .= $str;}
}
$p->{$name}->{showvalues} = $p->{$name}->{showvalues} || 0;
$p->{$name}->{storable} = $p->{$name}->{storable} || 0;
$p->{$name}->{xticks} = $p->{$name}->{xticks} || 0;
+ $p->{$name}{additional} = $p->{$name}{additional} || '';
my $filename = $p->{$name}->{file};
$filename =~ s%/%%;
if($p->{$name}->{output} == OUT_PNG) {
$p->{$name}->{file} or die "No filename specified";
- plot_write($fh,"set term png size ".$p->{$name}->{sizex}.",".$p->{$name}->{sizey}." font \"monospace,8\"");
+ plot_write($fh,"set term png size ".$p->{$name}->{sizex}.",".$p->{$name}->{sizey}." truecolor font \"monospace,8\"");
plot_write($fh,"set out \"".$p->{$name}->{file}.($p->{$name}->{buffer}?"tmp":"").".png\"");
}
elsif($p->{$name}->{output} == OUT_SCREEN) {
plot_write($fh,"set autoscale fix");
plot_write($fh,"set xtics autofreq"); #$p->{$name}->{entries}
plot_write($fh,"set grid");
+ plot_write($fh,$p->{$name}{additional}) if $p->{$name}{additional};
# plot_write($fh,"set style fill solid 1.0");
plot_write($fh,"plot ",1,$name);
for(my $j=0; $j<$p->{$name}->{curves};$j++) {
plot_write($fh,") offset 2.5,0 scale 0");
}
plot_write($fh,"set style data histograms");
+ plot_write($fh,$p->{$name}{additional});
+
plot_write($fh,"plot ",1,$name);
for(my $j=0; $j<$p->{$name}->{curves};$j++) {
plot_write($fh,', ',1,$name) if $j;