I'm trying to plot a 1D heatmap using two columns of data (x value and y value) in gnuplot. The linegraph plotted using my data is like this:

Linegraph:
[![enter image description here](https://i.stack.imgur.com/s5nnc.png)](https://i.stack.imgur.com/s5nnc.png)

However after some trying I can only achieve this:

What I've got:
[![enter image description here](https://i.stack.imgur.com/ea2cU.png)](https://i.stack.imgur.com/ea2cU.png)

And what I want to get is something like this. (Only example)

What I want:

[![enter image description here](https://i.stack.imgur.com/Ywvtc.png)](https://i.stack.imgur.com/Ywvtc.png)

The gnuplot script that I use is as follows:

```
set view map
set size ratio 0.2
unset ytics
unset key
splot 'test.dat' u 1:(1):2 palette

```

Could anyone help please?