...
1#!/usr/bin/env bash
2
3cat >volcano_data_test.go <<EOF
4// Generated code do not edit. Run \`go generate gonum.org/v1/plot/plotter\`.
5
6// Copyright ©2015 The Gonum Authors. All rights reserved.
7// Use of this source code is governed by a BSD-style
8// license that can be found in the LICENSE file.
9
10package plotter_test
11
12import "gonum.org/v1/gonum/mat"
13
14// Data extracted from RDatasets volcano data for the Maunga Whau volcano topographic data.
15var volcano = deciGrid{mat.NewDense(87, 61, []float64{
16EOF
17R -q -e 'write.table(as.data.frame(volcano), file="volcano_data_test.go", sep=", ", eol=",\n", col.names=FALSE, row.names=FALSE, append=TRUE)'
18echo >> volcano_data_test.go '})}'
19go fmt volcano_data_test.go
View as plain text