I am plotting a NxN square matrix with numbers between [0,1].
Due to the large number of zero, the matrix appears mostly black, but I know, and I can see by squinting my eyes, that there are many more points colored, only rendered in a dark color by the gradient.
I would like to plot using a "discontinuos" gradient, i.e. one that colors the 0 with black and assigns only very bright, high-visibility colors to any other values.
I would be fine with a strongly discrete or range-based gradient i.e. something like:
0 black, (0,0.25) white , (0.25,0.50) yellow, (0.50,0.75) green, (0.75,1] light blue
Is there any way to achieve something similiar?
Here is my current script, of which I have tried some alterations.
#!/bin/gnuplot
#
# Plot heat maps
#
unset key
set tic scale 0
set palette defined (0 "black" , 1 "white", 2 "yellow", 3 "red")
set cbrange [0:1]
unset cbtics
set xrange [1:N]
set yrange [N:1] # Not a typo
set term pdf
set output "mat.pdf"
plot 'mat.out' matrix with image