Am 02.03.20 um 10:06 schrieb Riccardo (Jack) Lucchetti:
On Sun, 1 Mar 2020, Artur Tarassow wrote:
>> Maybe we could find a way to show dates, but there's not much space
>> available in "scatters". At least now we don't over-extend the
x-axis.
>
> Maybe its beneficial to rotate the x-labels to save some space. But
> it has no priority I guess.
Something like this, perhaps?
<hansl>
open IT_companies.gdt --frompkg=MGARCH
scatters 2 3 4 5 --output="(a)dotdir/x.gp"
s = readfile("(a)dotdir/x.gp")
# generate daily xtics
ntics = 6
v = round(seq(1, $nobs, $nobs/ntics))
xtics = "set xtics ("
loop i = 1 .. ntics --quiet
vi = v[i]
xtics ~= sprintf("\"%s\" %d", obslabel(vi), vi)
if i<ntics
xtics ~= ", "
endif
endloop
xtics ~= ") rotate by -45"
# modify gnuplot script and plot
s = regsub(s, "set xtics (.*)", xtics)
outfile "(a)dotdir/y.gp" --quiet
print s
end outfile
gnuplot --input="(a)dotdir/y.gp" --output=display
</hansl>
I don't get any xtics here :-/ But apart from this: This is a very nice
example of exploiting "scatters" for enhancing multiplots.
Artur