## colorbar.gle
size 128set font ss
include "barstyles.gle"
set lwidth 0.01sub mypalette z
! Initialize r, g, b to the starting colour of the gradient.
! We are assuming ending colour is white (1,1,1).
local r =94/360
local g =19/360
local b =175/360
return cvtrgb(z*(r-1)+1,z*(g-1)+1,z*(b-1)+1)
endsub! Override built in bar_colormap
bar_colormap_pixels =200!What does this do?
sub bar_mycolormap x1 y1 x2 y2 b g
amove x1 y1
begin clip
begin path clip
box x2-x1 y2-y1
end path
colormap "y" 01011 bar_colormap_pixels x2-x1 y2-y1 palette mypalette
end clip
endsubbegin graph
ytitle "Performance"
data "colorbar.dat"
xaxis min 0.5 max 4.5 dticks 1
yaxis min -5 max 85 dticks 10
xdsubticks off
x2axis off
y2axis off
yaxis grid
yticks color grey20
bar d1,d2 width 0.3,0.3 style mycolormap,mycolormap
end graph
## colorbar.dat
1 -2721093504547080