bar_colormap_pixels = 200 bar_gridline_width = 0.01 sub bar_colormap x1 y1 x2 y2 b g amove x1 y1 begin clip begin path clip box x2-x1 y2-y1 end path colormap y 0 1 0 1 1 bar_colormap_pixels x2-x1 yg(ygmax)-yg(ygmin) color end clip box x2-x1 y2-y1 fill clear end sub sub bar_colormap_palette_labels x1 y1 x2 y2 value palette$ fmt$ if value >= 0 then y1 = y1 + bar_gridline_width y2 = y2 + bar_gridline_width else y1 = y1 - bar_gridline_width y2 = y2 - bar_gridline_width end if amove x1 y1 colormap y 0 1 0 1 1 bar_colormap_pixels x2-x1 y2-y1 palette palette$ ! draw data labels gsave set just bc hei 0.16 if value < 0 then y2 = yg(0) amove (x1+x2)/2 y2+0.1 write format$(value, fmt$) grestore end sub sub palette_shade_color_1 z return palette_shade_gray(z,barRed1,barGreen1,barBlue1) end sub sub bar_colormap1 x1 y1 x2 y2 b g bar_colormap_palette_labels x1 y1 x2 y2 b palette_shade_color_1 "fix 0" end sub sub palette_shade_color_2 z return palette_shade_gray(z,barRed2,barGreen2,barBlue2) end sub sub bar_colormap2 x1 y1 x2 y2 b g bar_colormap_palette_labels x1 y1 x2 y2 b palette_shade_color_2 "fix 0" end sub