Skip to content

Commit

Permalink
Merge pull request #315 from cuishuang/master
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
tdewolff authored Oct 4, 2024
2 parents f7585e3 + 00f2eef commit d601972
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion renderers/gonumplot.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (r *GonumPlot) SetLineWidth(length vg.Length) {
//
// The initial dash pattern is a solid line.
func (r *GonumPlot) SetLineDash(pattern []vg.Length, offset vg.Length) {
array := make([]float64, len(pattern))
array := make([]float64, 0, len(pattern))
for _, dash := range pattern {
array = append(array, float64(dash*mmPerPt))
}
Expand Down

0 comments on commit d601972

Please sign in to comment.