Gnuplot, choosing line type in cumulative plot

504 Views Asked by At

Hy everyone

I'm plotting a cumulative plot of up to 15 lines. To make it more readable and also readable printed black and white, I want to use different line types, but have a problem with that. First of, my script:

set terminal pdf
set output "Cumulative.pdf"
set autoscale yfix
set autoscale xfix
set key bottom right
set xlabel 'Something'
set ylabel 'Something else'
set style increment user
set style line 1  lc rgb '#372101' lw 3 lt 0 pt 0 ps 1
set style line 2  lc rgb '#FF8A9A' lw 3 lt 1 pt 1 ps 1
set style line 3  lc rgb '#7A4900' lw 3 lt 2 pt 2 ps 1
stats 'file1'
num1=STATS_records
stats 'file2'
num2=STATS_records
plot 0/0 notitle,\
'file1' u 2 : ((100.0/num1)) title '1' smooth cumulative,\
'file2' u 2 : ((100.0/num2)) title '2' smooth cumulative

My data files look something like this:

1 -54
2 -54
3 -71
4 -70
5 -71
6 -70

I would expect that Gnuplot uses the style that I previously set, but it does so only for the colour. The other options are ignored. When I add a 'with linespoints' or 'with points' I get the different point types. So far so good. What does not work with 'with lines' or 'with linespoints' is the line type. It's just the standard one. When I especially use 'lt x' in the plot command, it uses the xth line style, not the line type. I am wondering, it is possible to choose the line type with that sort of plot? It would be really helpful, as the point type would get lost easily in the graph. And if it is possible, is it also possible to make the line type consistent. What I mean is, if the points are very close to each other, that the line type is still readable. So that a dotted line type does not become a smooth line type, because you can't see the spaces anymore.

Any help is appreciated, even alternatives to make it more readable in black and white then with line or point types. Thanks!

0

There are 0 best solutions below