Commits

Anonymous committed 29a147c

add a readme

Comments (0)

Files changed (3)

Makefile

-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-include ${GOROOT}/src/Make.inc
-
-all: install
-
-DIRS=\
-	pkg/gnuplot\
-
-
-clean.dirs: $(addsuffix .clean, $(DIRS))
-install.dirs: $(addsuffix .install, $(DIRS))
-nuke.dirs: $(addsuffix .nuke, $(DIRS))
-test.dirs: $(addsuffix .test, $(TEST))
-bench.dirs: $(addsuffix .bench, $(BENCH))
-
-%.clean:
-	+cd $* && $(QUOTED_GOBIN)/gomake clean
-
-%.install:
-	+cd $* && $(QUOTED_GOBIN)/gomake install
-
-clean: clean.dirs
-
-install: install.dirs
-
-#-include ${GOROOT}/src/Make.deps
+go-gnuplot
+==========
+
+Simple-minded functions to work with ``gnuplot``.
+
+Installation
+------------
+
+The ``go-gnuplot`` package is ``go get`` installable::
+
+   $ go get bitbucket.org/binet/go-gnuplot/pkg/gnuplot
+
+
+Example
+--------
+
+::
+
+   | package main
+   | 
+   | import "bitbucket.org/binet/go-gnuplot/pkg/gnuplot"
+   | import "fmt"
+   | 
+   | func main() {
+   | 	fname := ""
+   | 	persist := false
+   | 	debug := true
+   | 
+   | 	p,err := gnuplot.NewPlotter(fname, persist, debug)
+   | 	if err != nil {
+   | 		err_string := fmt.Sprintf("** err: %v\n", err)
+   | 		panic(err_string)
+   | 	}
+   | 	defer p.Close()
+   | 
+   | 	p.PlotX([]float64{0,1,2,3,4,5,6,7,8,9,10}, "some data")
+   | 	p.CheckedCmd("set terminal pdf")
+   | 	p.CheckedCmd("set output 'plot002.pdf'")
+   | 	p.CheckedCmd("replot")
+   | 
+   | 
+   | 	p.CheckedCmd("q")
+   | 	return
+   | }
+

pkg/gnuplot/Makefile

-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-include ${GOROOT}/src/Make.inc
-
-TARG=bitbucket.org/binet/go-gnuplot/pkg/gnuplot
-GOFILES=\
-	gnuplot.go\
-
-
-include ${GOROOT}/src/Make.pkg
-