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

Function ExampleAxis_labelsPosition

align_example_test.go:92–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92func 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}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
SaveMethod · 0.80

Tested by

no test coverage detected