Commit c47e5b52 authored by David Blyth's avatar David Blyth

trackres: messing with colorbar

parent e7fdff55
...@@ -11,7 +11,7 @@ import ( ...@@ -11,7 +11,7 @@ import (
"github.com/decibelcooper/proio/go-proio/model/eic" "github.com/decibelcooper/proio/go-proio/model/eic"
"go-hep.org/x/hep/hbook" "go-hep.org/x/hep/hbook"
"gonum.org/v1/plot" "gonum.org/v1/plot"
"gonum.org/v1/plot/palette/brewer" "gonum.org/v1/plot/palette/moreland"
"gonum.org/v1/plot/plotter" "gonum.org/v1/plot/plotter"
"gonum.org/v1/plot/vg" "gonum.org/v1/plot/vg"
...@@ -118,11 +118,15 @@ func main() { ...@@ -118,11 +118,15 @@ func main() {
reader.Close() reader.Close()
pal, _ := brewer.GetPalette(brewer.TypeAny, "RdYlBu", 11) colorMap := moreland.BlackBody()
heatMap := plotter.NewHeatMap(resGrid, pal) colorMap.SetMin(0)
colorMap.SetMax(0.05)
heatMap := plotter.NewHeatMap(resGrid, colorMap.Palette(1000))
heatMap.Min = 0 heatMap.Min = 0
heatMap.Max = 0.05 heatMap.Max = 0.05
p.Add(heatMap) //p.Add(heatMap)
colorBar := &plotter.ColorBar{ColorMap: colorMap}
p.Add(colorBar)
p.Save(6*vg.Inch, 4*vg.Inch, *output) p.Save(6*vg.Inch, 4*vg.Inch, *output)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment