plotting points
by Allin Cottrell
This is a consolidated response to some points made lately by Sven
about various aspects of graphing/plotting in gretl.
1) There's now a "bars" mode for the --band-style option to "gnuplot'
and "plot": when this is given the "band" is plotted using the gnuplot
errorbars style. This does not look good if you have a high density of
points (ugly "millipede" effect) but it's arguably preferable in the
low-density case, since the other styles (lines, dash, fill) may give
a spurious impression of continuity of the band.
2) Up till now, the GUI "savename" apparatus for graphs, as in
graph1 <- gnuplot ...
has masked the gnuplot/plot option --output=display: you got the plot
saved as an icon under the specified name, but no window showing the
plot (until you double-click on the icon). That's now fixed: you can
both save the plot as a named icon and display it in a window without
delay.
3) This is a bit more technical. In
http://lists.wfu.edu/pipermail/gretl-devel/2016-October/006960.html
Sven suggests that we move to require gnuplot 5 for gretl (our current
minimum supported gnuplot version is 4.6.0). His reasoning is, "I
would like to see gretl handing the data over to gnuplot in the
'multiple-columns-side-by-side' format that gnuplot 5 apparently
adopted following Allin's suggestion. It would then be much easier to
tweak the appearance of plots beyond the subset functionality that is
directly supported by gretl."
There are various good reasons for requiring gnuplot 5 but I'm not
sure this is one of them. As Sven notes, the new mode of inlining data
was something I requested of the gnuplot developers. It has the
advantage of compactness: you can inline all the required data in a
single block, whereas with the old inlining method (still supported in
gnuplot 5) you need a separate data block for each y-axis variable,
and the x-axis data have to be repeated in each of these blocks.
However, there's something I hadn't thought of when I made that
suggestion. Under the old mode, the inlined data follow all the
gnuplot commands (typically a bunch of "set" statements followed by a
"plot" statement which may have multiple clauses). So all the lines
you might wish to tweak are up-front in the gnuplot source file. Under
the new mode the single data block is defined as an array variable,
which is then referenced by "plot". This means the data block must
precede "plot". No big deal, I suppose, if the data are few, but with
a dense plot you might have to scroll down through hundreds of lines
of data to get to the "plot" clauses (e.g. when editing the plot
commands in a gretl window). It seems to me this would be more
awkward.
Allin
8 years, 2 months
MIDAS: gretl crash
by Artur T.
Dear all,
I just freshly compiled gretl using ubuntu 16.04 (64 bit). Trying to
start via the GUI the "Model --> Time Series --> MIDAS" package results
in a gretl crash with the message:
<terminal>
Speicherzugriffsfehler (Speicherabzug geschrieben)
</terminal>
which I think hints to a "segementation fault".
Best,
Artur
8 years, 2 months
median for lists (feature request)
by Sven Schreiber
Hi,
I see no reason why median(L) shouldn't work like mean(L) works for a list.
Perhaps even kurtosis(L), or quantile(L, q), too?
(As per the guide, the supported such functions for list-to-series are
max, min, mean, sd, sum and var. Any other omissions?)
thanks,
sven
8 years, 3 months
about gnuplot's "errorbars" option
by Sven Schreiber
Hi,
I've done some experiments to get (vertical) lines indicating pointwise
confidence intervals into a plot with gnuplot. Basically I have one
question and one feature request.
First the question: it concerns some gnuplot code which works in pure
gnuplot but not as a saved graph symbol in gretl's session view. Here's
a concrete example: Start by running the following hansl snippet in gretl:
<hansl>
nulldata 10
setobs 1 1990 --time-series
series y = 2 * normal()
series width = uniform()
test <- plot y
options time-series with-lines
options band=y,width band-style=fill,0x000000
end plot --output=display
</hansl>
Now in the produced plotting code (right-click the graph symbol and
choose "edit plot commands") there's the following line:
<gnuplot>
'-' using 1:($2-1*$3):($2+1*$3) notitle lc rgb "#000000" w filledcurve, \
</gnuplot>
If I copy the entire code into a new text file and load that in gnuplot
it works alright.
Then I change (two things in) the line above to obtain (notice the extra
"($2)"!):
<gnuplot>
'-' using 1:($2):($2-1*$3):($2+1*$3) notitle lc rgb "#000000" w errorbars, \
</gnuplot>
... and loading the modified file in gnuplot produces what I want
(attached). However, if I apply these exact modifications to the
plotting commands saved in the session view icon of the graph and try to
view the result, I get an "unspecified error". So the question is
simply, why doesn't it work there?
The associated feature request is to enable an errorbars option to the
band-plotting apparatus. Basically adding a new band-style option
"errorbars" which writes the gnuplot code that I have described above.
Thanks,
sven
8 years, 3 months
ping: requiring gnuplot 5 for gretl
by Sven Schreiber
Hi,
the last time that we talked about making gnuplot 5 mandatory for gretl
seems to have been half a year ago (see thread "point size in gnuplot"
later renamed to "dashed lines").
What about making concrete plans for the switch? The first Ubuntu
version to have a gnuplot5 package is now 1,5 years old.
(If you care about my reason for pushing: I would like to see gretl
handing the data over to gnuplot in the "multiple-columns-side-by-side"
format that gnuplot 5 apparently adopted following Allin's suggestion.
It would then be much easier to tweak the appearance of plots beyond the
subset functionality that is directly supported by gretl.
Of course that requires changes in gretl, too. Jack had said that gretl
could be clever and check for the gnuplot version, but IMHO such a
complication wouldn't be worth the effort.)
cheers,
sven
8 years, 3 months
cannot delete (private) function from package
by Sven Schreiber
Hi,
I'm trying to edit one of my locally stored function packages. In
particular I click the button "Add/remove functions" in the edit window,
I get the next window with the function lists, and I remove (by clicking
the red arrow) one of the private helper functions, then click OK. This
action has no effect AFAICS.
The save gfn option under the save button is greyed out, as if I hadn't
changed anything.
This is with a fairly recent snapshot on Windows.
thanks,
sven
8 years, 3 months