James - 2017-07-17

Hello everyone,
I would like to make a plot of the following data file , by assigning a different color to each point, where the color is assigned based on the value in the first column.

I know how to do this for a plot made of points:

set palette model HSV defined ( 0 0 1 1, 1 1 1 1 ) # rainbow palette
p for [n=8:16] 'data.dat' every ::n::n pt 7 lc palette frac ((n-8.0)/(16.0-8.0)) ps 4 noti

which gives me the following output .

Now consider the same plot as above, but with histograms rather than points:

set style data histogram
set style histogram cluster gap 1
set style fill solid 1.00 border 0
set boxwidth 1
p 'data.dat' u 2:xticlabels(1) noti

In the second plot, the histograms all have the same filling color. I would like to modify the second plot, in such a way that the color that fills the histogram columns is the exact same as the color of the points in the plot above.

Do you know how to do this?

Thank you.