Gnuplot color every nth box in histogram
<p>I am plotting a large number of bars and therefore I only mark the every nth xtic (as seen in the .dat file with " "). Here are the first 15 lines of my input ".dat" file:</p>

<pre><code>1 150
" " 260
" " 340
" " 410
5 270
" " 280
" " 260
" " 370
" " 220
10 230
" " 340
" " 300
" " 200
" " 240
15 160
</code></pre>

<p>Plotting this data works fine. However, in my actual .dat file I have about 500k values to plot (500k boxes). Therefore I wanted to color every 10k box with a certain color (or in the example above, every 5th). This is the code used:</p>

<pre><code>set terminal postscript eps color
set output "genetic.eps"
set ylabel "Number of Exons"

set style fill solid 1.0 noborder

plot "genes.dat" using 2:xticlabels(1) smooth frequency with boxes notitle
</code></pre>

<p>Thanks!</p>