Skip to content

Commit

Permalink
plotter: fix volcano example
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Sep 16, 2020
1 parent e9d75d9 commit f0c1cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plotter/volcano_example.go
Expand Up @@ -42,7 +42,7 @@ func (g deciGrid) Y(r int) float64 {

func main() {
var levels []float64
for l := 100.5; l < volcano.Matrix.(*mat.Dense).Max(); l += 5 {
for l := 100.5; l < mat.Max(volcano.Matrix.(*mat.Dense)); l += 5 {
levels = append(levels, l)
}
c := plotter.NewContour(volcano, levels, palette.Rainbow(len(levels), (palette.Yellow+palette.Red)/2, palette.Blue, 1, 1, 1))
Expand Down Expand Up @@ -83,7 +83,7 @@ func main() {
".tiff",
".jpg",
} {
if err := p.Save(4, 4, name+ext); err != nil {
if err := p.Save(10*vg.Centimeter, 10*vg.Centimeter, name+ext); err != nil {
panic(err)
}
}
Expand Down

0 comments on commit f0c1cc1

Please sign in to comment.