# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 600, 400 # set output 'histogram_colors.1.png' unset border set boxwidth 0.8 absolute set style fill solid 1.00 border rgb "black" set key title " Category " center set key lmargin top vertical Right noreverse enhanced autotitle nobox set key invert samplen 4 spacing 1 width 2 height 0 set key maxcolumns 1 maxrows 0 offset character 2, 0 set style histogram columnstacked title textcolor lt -1 set style data histograms set xtics border in scale 1,0.5 nomirror norotate autojustify set xtics norangelimit set xtics () unset ytics set cbtics border in scale 1,0.5 nomirror norotate autojustify set title "Column-stacked histogram colored by data category" set xrange [ * : * ] noreverse writeback set x2range [ * : * ] noreverse writeback set yrange [ * : * ] noreverse writeback set y2range [ * : * ] noreverse writeback set zrange [ * : * ] noreverse writeback set cbrange [ * : * ] noreverse writeback set rrange [ * : * ] noreverse writeback set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault color(category) = 100 + strstrt(alphabet, category) NO_ANIMATION = 1 alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ## Last datafile plotted: "$Set3" plot for [data in "$Set1 $Set2 $Set3"] data using 2:(color(strcol(1))) lc variable title data, for [i=1:12] keyentry with boxes lc color(alphabet[i:i]) title alphabet[i:i]