Skip to content

Commit

Permalink
Merge pull request #5 from 6br/bugfix
Browse files Browse the repository at this point in the history
Fix plot
  • Loading branch information
6br authored Sep 21, 2016
2 parents 14836a4 + 0d777a5 commit 09db426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions goem/plot.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package goem

import (
"fmt"
"image/color"
"strconv"

"github.com/gonum/plot"
"github.com/gonum/plot/plotter"
Expand Down Expand Up @@ -32,7 +32,7 @@ func (em EM) Plot(fileid int, directory string) {
ss.Color = color.Black
p.Add(ss)

filename := directory + strconv.Itoa(fileid) + ".png"
filename := directory + fmt.Sprintf("%03d", fileid) + ".png"
if err := p.Save(10*vg.Inch, 10*vg.Inch, filename); err != nil {
panic(err)
}
Expand Down

0 comments on commit 09db426

Please sign in to comment.