From 60ba872a93e2faff36f75c0971ee35fae16a18ef Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Mon, 9 Jan 2017 23:24:56 +0100 Subject: cleanup --- main.go | 1 - tek.go | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index fabd317..db6a67e 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,6 @@ func steps(n int) []float64 { } func plot(out Plotter, patches []Patch) { - out.Clear() st := steps(5) for _, p := range patches { for _, u := range st { diff --git a/tek.go b/tek.go index d0909e1..cce0beb 100644 --- a/tek.go +++ b/tek.go @@ -8,7 +8,10 @@ import ( const ( FF = 12 ESC = 27 - GS = 29 + FS = 28 // point plot + GS = 29 // graph and dark vector + RS = 30 // incremental plot + US = 31 // alpha mode ) type Out struct { @@ -43,14 +46,13 @@ func (o Out) Clear() { func (o Out) Enable() { if o.xterm { o.escString("[?38h") - o.Clear() } + o.Clear() } func (o Out) Disable() { + o.writeByte(US) // Text mode if o.xterm { - //o.escString("[?38l") - o.writeByte(31) // Text mode o.writeByte(ESC, 3) // VT Page } } -- cgit v1.2.3