()
| 14 | ) |
| 15 | |
| 16 | func 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. |
| 33 | func ExampleColorBar_horizontal_log() { |