MCPcopy Index your code
hub / github.com/gonum/plot / ExampleColorBar_horizontal

Function ExampleColorBar_horizontal

plotter/colorbar_example_test.go:16–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16func ExampleColorBar_horizontal() {
17 p := plot.New()
18 p.HideY()
19 p.X.Padding = 0
20 p.Title.Text = "Title"
21
22 l := &plotter.ColorBar{ColorMap: moreland.ExtendedBlackBody()}
23 l.ColorMap.SetMin(0.5)
24 l.ColorMap.SetMax(1.5)
25 p.Add(l)
26
27 if err := p.Save(300, 48, "testdata/colorBarHorizontal.png"); err != nil {
28 log.Panic(err)
29 }
30}
31
32// This example shows how to create a ColorBar on a log-transformed axis.
33func ExampleColorBar_horizontal_log() {

Callers

nothing calls this directly

Calls 7

NewFunction · 0.92
ExtendedBlackBodyFunction · 0.92
HideYMethod · 0.80
SaveMethod · 0.80
SetMinMethod · 0.65
SetMaxMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected