So, I've got next problem. I'm writing a Perl plugin for my own Gnuplot wrapper, and I need to plot stacked-area chart, but here's problem with tics.
I have the following datfile (date in epoch - for Perl functions):
date c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12
1521230521 173 830 988 284 165 577 920 749 409 705 703 601
1521316921 501 691 883 573 325 152 499 526 417 708 259 587
1521403321 33 193 576 106 397 329 801 857 534 559 527 213
1521489721 827 186 910 412 688 650 13 201 222 150 468 353
1521576121 53 425 726 989 362 489 554 986 480 485 414 74
.....
And I got this script (used variables from Perl script, keep note of this):
reset
set encoding utf8
set term pngcairo size $w, $h
set datafile separator "\\t"
set key autotitle
set key reverse Left outside
set key samplen 0.25 spacing 1 font "Roboto Mono Medium, 11"
set key bot center horiz
set key height 1
set output "img.png"
set xtics ("16 mar 22:45" 0, ...., "04 apr 22:45" 19) # string generated by perl
set xtics font "Roboto Mono Light, 9" nomirror out
set ytics font "Roboto Mono Light, 9" nomirror out
set auto y
set tics front
# $rm # set rmargin
# $lm # set lmargin
set grid xtics ytics front
set style data filledcurves x1
set pointsize 0.8
plot for [i=2:".($cols+1).":1] '$datfile' using 1:(sum [col=i:".($cols+1)."] column(col)) title columnheader(i)
I need tics to look like that:
but tics don't show up:
You might ask me why I am not using set xdata time
? That's because of uncontrollable tic overlapping in case if there's a lot of tics. That's why I'm using strict pre-calculated pairs like this:
set xtics ("16 mar 22:45" 0, "22 mar 23:02" 6, ...., "04 apr 22:45" 19)
and that worked for the histogram chart.
What am I doing wrong?