Skip to content

Commit 00f2eef

Browse files
authoredOct 4, 2024
fix: fix slice init length
1 parent f7585e3 commit 00f2eef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎renderers/gonumplot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (r *GonumPlot) SetLineWidth(length vg.Length) {
5151
//
5252
// The initial dash pattern is a solid line.
5353
func (r *GonumPlot) SetLineDash(pattern []vg.Length, offset vg.Length) {
54-
array := make([]float64, len(pattern))
54+
array := make([]float64, 0, len(pattern))
5555
for _, dash := range pattern {
5656
array = append(array, float64(dash*mmPerPt))
5757
}

0 commit comments

Comments
 (0)
Please sign in to comment.