()
| 52 | } |
| 53 | |
| 54 | func ExampleColorBar_vertical() { |
| 55 | p := plot.New() |
| 56 | l := &plotter.ColorBar{ColorMap: moreland.ExtendedBlackBody()} |
| 57 | l.ColorMap.SetMin(0.5) |
| 58 | l.ColorMap.SetMax(1.5) |
| 59 | l.Vertical = true |
| 60 | p.Add(l) |
| 61 | p.HideX() |
| 62 | p.Y.Padding = 0 |
| 63 | p.Title.Text = "Title" |
| 64 | |
| 65 | if err := p.Save(40, 300, "testdata/colorBarVertical.png"); err != nil { |
| 66 | log.Panic(err) |
| 67 | } |
| 68 | } |