version 1.130, 2007/09/18 23:29:39
|
version 1.133, 2007/12/14 06:34:59
|
Line 435 my %tic_defaults =
|
Line 435 my %tic_defaults =
|
}, |
}, |
); |
); |
|
|
my @axis_edit_order = ('color','xmin','xmax','ymin','ymax'); |
my @axis_edit_order = ('color','xmin','xmax','ymin','ymax','xformat', 'yformat'); |
my %axis_defaults = |
my %axis_defaults = |
( |
( |
color => { |
color => { |
Line 472 my %axis_defaults =
|
Line 472 my %axis_defaults =
|
description => 'Maximum y-value shown in plot', |
description => 'Maximum y-value shown in plot', |
edit_type => 'entry', |
edit_type => 'entry', |
size => '10' |
size => '10' |
} |
}, |
|
xformat => { |
|
default => 'on', |
|
test => sub {$_[0]=~/^(on|off|\d+(f|F|e|E))$/}, |
|
description => 'X-axis number formatting', |
|
edit_type => 'choice', |
|
choices => ['on', 'off', '2e', '2f'], |
|
}, |
|
yformat => { |
|
default => 'on', |
|
test => sub {$_[0]=~/^(on|off|\d+(f|F|e|E))$/}, |
|
description => 'X-axis number formatting', |
|
edit_type => 'choice', |
|
choices => ['on', 'off', '2e', '2f'], |
|
}, |
|
|
); |
); |
|
|
my @curve_edit_order = ('color','name','linestyle','linewidth','pointtype','pointsize','limit'); |
my @curve_edit_order = ('color','name','linestyle','linewidth','pointtype','pointsize','limit'); |
Line 786 sub parse_label {
|
Line 801 sub parse_label {
|
|
|
|
|
my %lookup = |
my %lookup = |
('(pi|#960)' => {'tex' => '{/Symbol p}', 'web' => "\x{3C0}"},); |
('(Alpha|#913)' => {'tex' => '{/Symbol A}', 'web' => "\x{391}"}, |
|
'(Beta|#914)' => {'tex' => '{/Symbol B}', 'web' => "\x{392}"}, |
|
'(Chi|#935)' => {'tex' => '{/Symbol C}', 'web' => "\x{3A7}"}, |
|
'(Delta|#916)' => {'tex' => '{/Symbol D}', 'web' => "\x{394}"}, |
|
'(Epsilon|#917)' => {'tex' => '{/Symbol E}', 'web' => "\x{395}"}, |
|
'(Phi|#934)' => {'tex' => '{/Symbol F}', 'web' => "\x{3A6}"}, |
|
'(Gamma|#915)' => {'tex' => '{/Symbol G}', 'web' => "\x{393}"}, |
|
'(Eta|#919)' => {'tex' => '{/Symbol H}', 'web' => "\x{397}"}, |
|
'(Iota|#921)' => {'tex' => '{/Symbol I}', 'web' => "\x{399}"}, |
|
'(Kappa|#922)' => {'tex' => '{/Symbol K}', 'web' => "\x{39A}"}, |
|
'(Lambda|#923)' => {'tex' => '{/Symbol L}', 'web' => "\x{39B}"}, |
|
'(Mu|#924)' => {'tex' => '{/Symbol M}', 'web' => "\x{39C}"}, |
|
'(Nu|#925)' => {'tex' => '{/Symbol N}', 'web' => "\x{39D}"}, |
|
'(Omicron|#927)' => {'tex' => '{/Symbol O}', 'web' => "\x{39F}"}, |
|
'(Pi|#928)' => {'tex' => '{/Symbol P}', 'web' => "\x{3A0}"}, |
|
'(Theta|#920)' => {'tex' => '{/Symbol Q}', 'web' => "\x{398}"}, |
|
'(Rho|#929)' => {'tex' => '{/Symbol R}', 'web' => "\x{3A1}"}, |
|
'(Sigma|#931)' => {'tex' => '{/Symbol S}', 'web' => "\x{3A3}"}, |
|
'(Tau|#932)' => {'tex' => '{/Symbol T}', 'web' => "\x{3A4}"}, |
|
'(Upsilon|#933)' => {'tex' => '{/Symbol U}', 'web' => "\x{3A5}"}, |
|
'(Omega|#937)' => {'tex' => '{/Symbol W}', 'web' => "\x{3A9}"}, |
|
'(Xi|#926)' => {'tex' => '{/Symbol X}', 'web' => "\x{39E}"}, |
|
'(Psi|#936)' => {'tex' => '{/Symbol Y}', 'web' => "\x{3A8}"}, |
|
'(Zeta|#918)' => {'tex' => '{/Symbol Z}', 'web' => "\x{396}"}, |
|
'(alpha|#945)' => {'tex' => '{/Symbol a}', 'web' => "\x{3B1}"}, |
|
'(beta|#946)' => {'tex' => '{/Symbol b}', 'web' => "\x{3B2}"}, |
|
'(chi|#967)' => {'tex' => '{/Symbol c}', 'web' => "\x{3C7}"}, |
|
'(delta|#948)' => {'tex' => '{/Symbol d}', 'web' => "\x{3B4}"}, |
|
'(epsilon|#949)' => {'tex' => '{/Symbol e}', 'web' => "\x{3B5}"}, |
|
'(phi|#966)' => {'tex' => '{/Symbol f}', 'web' => "\x{3C6}"}, |
|
'(gamma|#947)' => {'tex' => '{/Symbol g}', 'web' => "\x{3B3}"}, |
|
'(eta|#951)' => {'tex' => '{/Symbol h}', 'web' => "\x{3B7}"}, |
|
'(iota|#953)' => {'tex' => '{/Symbol i}', 'web' => "\x{3B9}"}, |
|
'(kappa|#954)' => {'tex' => '{/Symbol k}', 'web' => "\x{3BA}"}, |
|
'(lambda|#955)' => {'tex' => '{/Symbol k}', 'web' => "\x{3BB}"}, |
|
'(mu|#956)' => {'tex' => '{/Symbol m}', 'web' => "\x{3BC}"}, |
|
'(nu|#957)' => {'tex' => '{/Symbol n}', 'web' => "\x{3BD}"}, |
|
'(omicron|#959)' => {'tex' => '{/Symbol o}', 'web' => "\x{3BF}"}, |
|
'(pi|#960)' => {'tex' => '{/Symbol p}', 'web' => "\x{3C0}"}, |
|
'(theta|#952)' => {'tex' => '{/Symbol q}', 'web' => "\x{3B8}"}, |
|
'(rho|#961)' => {'tex' => '{/Symbol r}', 'web' => "\x{3C1}"}, |
|
'(sigma|#963)' => {'tex' => '{/Symbol s}', 'web' => "\x{3C3}"}, |
|
'(tau|#964)' => {'tex' => '{/Symbol t}', 'web' => "\x{3C4}"}, |
|
'(upsilon|#965)' => {'tex' => '{/Symbol u}', 'web' => "\x{3C5}"}, |
|
'(omega|#969)' => {'tex' => '{/Symbol w}', 'web' => "\x{3C9}"}, |
|
'(xi|#958)' => {'tex' => '{/Symbol x}', 'web' => "\x{3BE}"}, |
|
'(psi|#968)' => {'tex' => '{/Symbol y}', 'web' => "\x{3C8}"}, |
|
'(zeta|#950)' => {'tex' => '{/Symbol z}', 'web' => "\x{3B6}"}, |
|
); |
|
|
|
|
sub replace_entities { |
sub replace_entities { |
my ($target,$text) = @_; |
my ($target,$text) = @_; |
Line 1321 sub write_gnuplot_file {
|
Line 1385 sub write_gnuplot_file {
|
} |
} |
# axis |
# axis |
if (%axis) { |
if (%axis) { |
|
if ($axis{'xformat'} ne 'on') { |
|
$gnuplot_input .= "set format x "; |
|
if ($axis{'xformat'} eq 'off') { |
|
$gnuplot_input .= "\"\"\n"; |
|
} else { |
|
$gnuplot_input .= "\"\%.".$axis{'xformat'}."\"\n"; |
|
} |
|
} |
|
if ($axis{'yformat'} ne 'on') { |
|
$gnuplot_input .= "set format y "; |
|
if ($axis{'yformat'} eq 'off') { |
|
$gnuplot_input .= "\"\"\n"; |
|
} else { |
|
$gnuplot_input .= "\"\%.".$axis{'yformat'}."\"\n"; |
|
} |
|
} |
$gnuplot_input .= "set xrange \[$axis{'xmin'}:$axis{'xmax'}\]\n"; |
$gnuplot_input .= "set xrange \[$axis{'xmin'}:$axis{'xmax'}\]\n"; |
$gnuplot_input .= "set yrange \[$axis{'ymin'}:$axis{'ymax'}\]\n"; |
$gnuplot_input .= "set yrange \[$axis{'ymin'}:$axis{'ymax'}\]\n"; |
} |
} |
Line 1361 sub write_gnuplot_file {
|
Line 1441 sub write_gnuplot_file {
|
$curve->{'function'}.' title "'. |
$curve->{'function'}.' title "'. |
$curve->{'name'}.'" with '. |
$curve->{'name'}.'" with '. |
$curve->{'linestyle'}; |
$curve->{'linestyle'}; |
$gnuplot_input.= ' linewidth '.$curve->{'linewidth'}; |
|
|
|
if (($curve->{'linestyle'} eq 'points') || |
if (($curve->{'linestyle'} eq 'points') || |
($curve->{'linestyle'} eq 'linespoints') || |
($curve->{'linestyle'} eq 'linespoints') || |
Line 1374 sub write_gnuplot_file {
|
Line 1453 sub write_gnuplot_file {
|
} elsif ($curve->{'linestyle'} eq 'filledcurves') { |
} elsif ($curve->{'linestyle'} eq 'filledcurves') { |
$gnuplot_input.= ' '.$curve->{'limit'}; |
$gnuplot_input.= ' '.$curve->{'limit'}; |
} |
} |
|
$gnuplot_input.= ' linewidth '.$curve->{'linewidth'}; |
|
|
} elsif (exists($curve->{'data'})) { |
} elsif (exists($curve->{'data'})) { |
# Store data values in $datatext |
# Store data values in $datatext |
my $datatext = ''; |
my $datatext = ''; |
Line 1397 sub write_gnuplot_file {
|
Line 1478 sub write_gnuplot_file {
|
$gnuplot_input.= '"'.$datafilename.'" title "'. |
$gnuplot_input.= '"'.$datafilename.'" title "'. |
$curve->{'name'}.'" with '. |
$curve->{'name'}.'" with '. |
$curve->{'linestyle'}; |
$curve->{'linestyle'}; |
$gnuplot_input.= ' linewidth '.$curve->{'linewidth'}; |
|
if (($curve->{'linestyle'} eq 'points') || |
if (($curve->{'linestyle'} eq 'points') || |
($curve->{'linestyle'} eq 'linespoints') || |
($curve->{'linestyle'} eq 'linespoints') || |
($curve->{'linestyle'} eq 'errorbars') || |
($curve->{'linestyle'} eq 'errorbars') || |
Line 1409 sub write_gnuplot_file {
|
Line 1489 sub write_gnuplot_file {
|
} elsif ($curve->{'linestyle'} eq 'filledcurves') { |
} elsif ($curve->{'linestyle'} eq 'filledcurves') { |
$gnuplot_input.= ' '.$curve->{'limit'}; |
$gnuplot_input.= ' '.$curve->{'limit'}; |
} |
} |
|
$gnuplot_input.= ' linewidth '.$curve->{'linewidth'}; |
} |
} |
} |
} |
# Write the output to a file. |
# Write the output to a file. |