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
|
{ # -*- ifm -*-
# template for plotting an difference spectrum
# {$D->group} returns the ifeffit group name
# {$D->parameter} returns the value of that parameter
# {$P->parameter} returns the value of a Plot parameter
}
{
$emin = $S->data->bkg_e0 + $P->emin;
$emax = $S->data->bkg_e0 + $P->emax;
if ($S->space =~ m{\Achi}) {
$emin = $P->kmin;
$emax = $P->kmax;
};
$xlabel = ($S->space =~ m{\Achi}) ? "Wavenumber&\{aa\}(Å^\{-1\})" : "Energy&\{aa\}(eV)";
($ylabel = "Difference of absorption") if ($S->space =~ m{\Axmu});
($ylabel = "Difference of normalized absorption") if ($S->space =~ m{\Anor});
($ylabel = "Difference of derivative") if ($S->space =~ m{\An?der});
($ylabel = "Difference of second derivative") if ($S->space =~ m{\An?sec});
($ylabel = "Difference of " . $P->plot_kylabel) if ($S->space =~ m{\Achi});
$suffix ||= 'diff';
$file = $P->tempfile;
$S->points(file => $file,
space => 'diff',
suffix => 'diff',
yoffset => $D->y_offset,
);
$thiskey = $S->name || "difference";
$thiskey =~ s{_}{\\\\_}g;
q{}
}
## gnuplot script
set title "\{/*1.6 {$P->escapedtitle}\}"
set xlabel "\{/*1.4 {$xlabel}\}"
set ylabel "\{/*1.4 {$ylabel}\}"
set xrange [ {$emin} : {$emax} ]
plot '{$file}' using 1:2 with {$C->default("gnuplot", "datastyle")} ls {$P->increm+1} title "{$thiskey}"
|