Frage

I'm trying to print stacked histogram from gnuplot into black and white png. By this I mean I would like each region in the bar to be hatched or checked alongside the legend on the side; that way when it's printed people can still identify the regions. I've tried the following but it just leaves me with big black blobs!

set term pngcairo mono   size 750, 300
set output \"pies/interesting.png\"
set style data histograms
set style histogram rowstacked
set boxwidth 1 relative
set style fill solid 1 border -1
set yrange [0:100]
set ytics 10
set datafile separator \",\"
plot './functions-$MODE.csv.t' using 1 t \"\", for [i=9:13] '' using (100.*column(i)/column(15)) ti column(i) 

How do I make my regions hatched?

War es hilfreich?

Lösung

Apologies for answering my own question....I've realised that a stacked histogram behaves like a normal histogram: thus if I use the styles found on this page: http://gnuplot.sourceforge.net/demo/fillstyle.html I can customise to how I would like: setting "set style fill pattern border" :

set term pngcairo mono size 750, 300
set output \"pies/interesting.png\"
set style data histograms
set style histogram rowstacked
set boxwidth 1 relative
set style fill pattern border
set datafile separator \",\"
plot './functions-$MODE.csv.t' using 1 t \"\", for [i=9:13] '' using (100.*column(i)/column(15)) ti column(i) 

Results in the desired effect.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top