Hi, replace the numerical values by strings:
<hansl>
nulldata 240
series aa = normal(0,2)
series bb = 2^normal(0,2)
series cc = 3^normal(0,2)
scalar minx = min(bb)<min(cc)?min(bb):min(cc)
scalar maxx = max(bb)>max(cc)?max(bb):max(cc)
sprintf strmin "%.4f", minx
sprintf strmax "%.4f", maxx
gnuplot aa bb --output="bb.png" { set xrange[@strmin:@strmax]; }
gnuplot aa cc --output="cc.png" { set xrange[@strmin:@strmax]; }
</hansl>
Also, the $-sign is an accessor for internal gretl functions or the loop
only.
Best,
Artur
Am 21.01.2016 um 14:22 schrieb Schaff, Frederik:
Hello there,
I'd like to produce a bunch of customised graphs with gretl in a loop, where I fix
the axis ranges depending on values that I calculated beforehand. A minimum (not-) working
example is below.
-------
nulldata 240
series aa = normal(0,2)
series bb = 2^normal(0,2)
series cc = 3^normal(0,2)
scalar minx = min(bb)<min(cc)?min(bb):min(cc)
scalar maxx = max(bb)>max(cc)?max(bb):max(cc)
gnuplot aa bb --output="bb.png" { set xrange[$minx:$maxx]; }
gnuplot aa cc --output="cc.png" { set xrange[$minx:$maxx]; }
------
This does not work because one cannot pass $minx
Is there another way to do so?
Many thanks
Frederik
------------
Frederik Schaff, Dipl.-Volkswirt
University of Hagen
Department of Business and Economics
Chair of Economic Theory (Prof. A. Endres)
Universitätsstraße 11 (TGZ)
58097 Hagen
Phone: +49 (0) 2331 987-4454
E-Mail: Frederik.Schaff(a)FernUni-Hagen.de
http://www.fernuni-hagen.de/wirtschaftstheorie/en/team/frederik.schaff.shtml
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users