summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go1
-rw-r--r--tek.go10
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
}
}