-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Description
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"
)
func main() {
p := plot.New()
p.Legend = plot.NewLegend()
length := 70
xy := make(plotter.XYs, length)
for i := 0; i < length; i++ {
xy[i] = plotter.XY{X: float64(i), Y: rand.Float64()}
}
lines, err := plotter.NewLine(xy)
if err != 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.
Metadata
Metadata
Assignees
Labels
No labels
