1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
{
$datastyle = ($P->datastyle eq 'solid') ? 'lines' : 'points';
($down, $up) = $D->floor_ceil('nder');
$xmin = ($S->space =~ m{[ck]}) ? $S->xmin-1 : $S->e0 + $S->xmin-10;
$xmax = ($S->space =~ m{[ck]}) ? $S->xmax+1 : $S->e0 + $S->xmax+10;
$where = ($S->space =~ m{[ex]}) ? 'center' : 'top';
$data = $P->tempfile;
$S->points(file => $data,
space => 'x',
suffix => $D->group,
);
$tart = $P->tempfile;
$S->points(file => $tart,
space => 'x',
suffix => 'tt',
);
$diff = $P->tempfile;
$S->points(file => $diff,
space => 'x',
suffix => 'diff',
yoffset => ($S->space eq 'd') ? 1.25*$down : 0,
);
q{};
}
## gnuplot script
set key {$where} right
set title "\{/*1.6 PCA target transform\}"
set xlabel "\{/*1.4 Energy&\{aa\}(eV)\}"
set ylabel "\{/*1.4 {$S->ylabel}\}"
set xrange [ {$xmin} : {$xmax} ]
## reconstruction of {$D->name} ({$D->group})
plot '{$data}' using 1:2 with {$C->default("gnuplot", "datastyle")} ls {$P->increm+1} title "{$D->name}",\
'{$tart}' using 1:2 with {$C->default("gnuplot", "datastyle")} ls {$P->increm+2} title "target transform",\
'{$diff}' using 1:2 with {$C->default("gnuplot", "datastyle")} ls {$P->increm+3} title "residual"
|