Hi!
I am new to Gnuplot and I try create a "stacked" histogram from some
output of my application.
Currently I use the following code:
> set boxwidth 1.00
> set style fill solid 1.00 border -1
> set key autotitle columnheader
> set key invert reverse Left outside
> set yrange [0:*]
> set xrange [0:*]
> set auto x
> unset xtics
> set style data histogram
> set style histogram rowstacked
> set ylabel "Counts"
> set xlabel "File Index"
I then plot the histogram via the following command:
> gnuplot.exe "histogram.pl" -e "set title 'Some Title'" -e "set yrange
> [0:*]" -e "set terminal png size 1024,768" -e "set output
> 'output.png'" -e "plot 'input.dat' using 2:xtic(1), for [i=%6:%7] ''
> using i"
The file "input.dat" is generated by my application. It looks like this:
> No Correct Incorrect Lost Embedded
> 0 7 0 11 18
> 1 9 0 1 10
> 2 46 2 0 48
> 3 11 9 30 50
> [...]
The output from Gnuplot already looks like what I had intended:
http://img684.imageshack.us/img684/1310/messager44100b64jsetup1.png
Now my question:
How can I change the colors? I can change the order of the columns in my
.dat file, yes.
But ideally I would like to assign each column (and thus each part of a
histogram bar) a specific color.
Is that possible with Gnuplot?
Also, I would also like to create a "grey-scale" version of the stacked
histogram, using different patterns rather than different colors.
If possible, how would I do that?
Thanks a lot in advance!
Regards,
Daniel.
|