I should have added that I wrote a hansl-script doing this job (see below).
Since gnuplot-version v.4.?. one can use the "set style data boxplot"
environment, and does not necessarily have to rely on the
candlestick-framework, as currently implemented in gretl.
Nevertheless, since plotting is a basic function users use, it would be
nice if one could implement some more flexibility into the natively offered
boxplot-function in gretl...
Artur
----------------------
function void write_boxplot (string ttitle,
string ylabel,
scalar ymin,
scalar ymax,
matrix Y)
string tmpfname = "boxtmp.gp"
win = $windows
if win == 1
sprintf tmpfile "@dotdir\@tmpfname"
else
sprintf tmpfile "@dotdir/@tmpfname"
endif
set force_decpoint on
outfile "@tmpfile" --write
printf "set encoding utf8\n"
printf "set border 2 front linetype -1 linewidth 2.000\n"
printf "set boxwidth 0.5 absolute\n"
printf "set style fill solid 0.6 border lt -1\n"
#printf "set style fill empty border lt -2 \n"
printf "set nokey\n"
printf "set pointsize 0.5\n"
printf "set style boxplot outliers pointtype 7\n"
printf "set style data boxplot\n"
printf "set xzeroaxis lw 3 lt -1\n"
printf "set grid lw 5\n"
# printf "set xtics border in scale 0,0 nomirror norotate offset
character 0, 0, 0 autojustify\n"
# printf "set xtics norangelimit\n"
printf "unset xtics\n"
#printf "set xtics ()\n"
#printf "set xtics nomirror\n"
#printf "set ytics border in scale 1,0.5 nomirror norotate offset
character 0, 0, 0 autojustify font ',20'\n"
printf "set ytics nomirror font ',20'\n"
printf "set yrange [%.3f:%.3f]\n", ymin, ymax
printf "set title '@ttitle' font ',20'\n"
printf "set ylabel '@ylabel'\n"
printf "set datafile missing 'nan'\n"
printf "plot '-' using (1):2\n"
loop t=1..rows(Y) --quiet
printf "%d %g\n", t-1, Y[t]
endloop
printf "e\n"
outfile "@tmpfile" --close
printf "set force_decpoint off\n"
end function
2013/4/28 artur tarassow <artur.tarassow(a)googlemail.com>
Dear gretl programmers,
at the moment it is not possible to set further plotting options using the
boxplot-command.
Would it possible to allow more flexibility for the user such as
"{ set title '' ; }" or "set grid" "set ylabel"
etc.?
Best,
Artur