What are you trying to do?
Just trying to make a simple line plot. However, depending on the axis limits, the rendered plot does not fit onto the image and exceeds its bounds.
What did you do?
Minimal reproducing example:
package main
import (
"math/rand""gonum.org/v1/plot""gonum.org/v1/plot/plotter"
)
funcmain() {
p:=plot.New()
p.Legend=plot.NewLegend()
length:=70xy:=make(plotter.XYs, length)
fori:=0; i<length; i++ {
xy[i] = plotter.XY{X: float64(i), Y: rand.Float64()}
}
lines, err:=plotter.NewLine(xy)
iferr!=nil {
panic(err)
}
p.Add(lines)
p.Legend.Add("Legend entry", lines)
p.Save(600, 400, "test.png")
}What did you expect to happen?
The plot nicely fills the image.
What actually happened?
The plot is partially outside the image bounds:

What version of Go and Gonum/plot are you using?
go version go1.20 windows/amd64
plot vrsion v0.12.0
Does this issue reproduce with the current master?
Yes.
What are you trying to do?
Just trying to make a simple line plot. However, depending on the axis limits, the rendered plot does not fit onto the image and exceeds its bounds.
What did you do?
Minimal reproducing example:
What did you expect to happen?
The plot nicely fills the image.
What actually happened?
The plot is partially outside the image bounds:
What version of Go and Gonum/plot are you using?
go version go1.20 windows/amd64
plot vrsion v0.12.0
Does this issue reproduce with the current master?
Yes.