()
| 90 | } |
| 91 | |
| 92 | func ExampleAxis_labelsPosition() { |
| 93 | p := plot.New() |
| 94 | p.Title.Text = "Title" |
| 95 | p.X.Label.Text = "X [mm]" |
| 96 | p.Y.Label.Text = "Y [A.U.]" |
| 97 | p.X.Label.Position = draw.PosRight |
| 98 | p.Y.Label.Position = draw.PosTop |
| 99 | p.X.Min = -10 |
| 100 | p.X.Max = +10 |
| 101 | p.Y.Min = -10 |
| 102 | p.Y.Max = +10 |
| 103 | |
| 104 | err := p.Save(10*vg.Centimeter, 10*vg.Centimeter, "testdata/axis_labels.png") |
| 105 | if err != nil { |
| 106 | log.Fatalf("could not save plot: %+v", err) |
| 107 | } |
| 108 | } |