├── AUTHORS ├── CONTRIBUTORS ├── LICENSE ├── Makefile ├── README.md ├── all_test.go ├── ast.go ├── ast2.go ├── ast_test.go ├── etc.go ├── generate.go ├── lexer.go ├── parser.go ├── parser.yy ├── plot.go ├── scanner.go ├── scanner.l ├── testdata ├── example.gp └── gnuplot-5.0.3 │ ├── Copyright │ └── demo │ ├── airfoil.dem │ ├── all.dem │ ├── animate.dem │ ├── animate2.dem │ ├── approximate.dem │ ├── arrowstyle.dem │ ├── autoscale.dem │ ├── barchart_art.dem │ ├── binary.dem │ ├── bivariat.dem │ ├── bolditalic.dem │ ├── borders.dem │ ├── boxplot.dem │ ├── callargs.dem │ ├── candlesticks.dem │ ├── cerf.dem │ ├── charset.dem │ ├── circles.dem │ ├── cities.dem │ ├── clipobject.dem │ ├── colorscheme.dem │ ├── colorwheel.dem │ ├── complex_trig.dem │ ├── contours.dem │ ├── controls.dem │ ├── dashcolor.dem │ ├── dashtypes.dem │ ├── datastrings.dem │ ├── density.fnc │ ├── dgrid3d.dem │ ├── discrete.dem │ ├── electron.dem │ ├── ellipse.dem │ ├── ellipses_style.dem │ ├── enhanced_utf8.dem │ ├── enhancedtext.dem │ ├── epslatex.dem │ ├── fillbetween.dem │ ├── fillcrvs.dem │ ├── fillstyle.dem │ ├── finance.dem │ ├── fit.dem │ ├── fitmulti.dem │ ├── fontfile.dem │ ├── fontfile_latex.dem │ ├── gantt.dem │ ├── gen-random.inc │ ├── heatmaps.dem │ ├── hexa.fnc │ ├── hidden.dem │ ├── hidden2.dem │ ├── histograms.dem │ ├── histograms2.dem │ ├── html │ ├── canvas_utf8.dem │ └── mouseable.dem │ ├── hypertext.dem │ ├── image.dem │ ├── image2.dem │ ├── imageNaN.dem │ ├── iterate.dem │ ├── kdensity2d.dem │ ├── key.dem │ ├── layout.dem │ ├── line.fnc │ ├── lines_arrows.dem │ ├── linkedaxes.dem │ ├── macros.dem │ ├── margins.dem │ ├── matrix_index.dem │ ├── mgr.dem │ ├── molecule.dem │ ├── mouselab_1.dem │ ├── mouselab_2.dem │ ├── mouselabels.dem │ ├── mousevariables.dem │ ├── multiaxis.dem │ ├── multimsh.dem │ ├── multipalette.dem │ ├── multiplt.dem │ ├── named_var.dem │ ├── nokey.dem │ ├── orbits.dem │ ├── parallel.dem │ ├── param.dem │ ├── piecewise.dem │ ├── plugin │ └── plugin.dem │ ├── pm3d.dem │ ├── pm3dcolors.dem │ ├── pm3dgamma.dem │ ├── pointsize.dem │ ├── polar.dem │ ├── poldat.dem │ ├── prob.dem │ ├── prob2.dem │ ├── rainbow.dem │ ├── random.dem │ ├── rectangle.dem │ ├── reflect.fnc │ ├── rgb_variable.dem │ ├── rgba_lines.dem │ ├── rgbalpha.dem │ ├── rugplot.dem │ ├── running_avg.dem │ ├── scatter.dem │ ├── simple.dem │ ├── singulr.dem │ ├── smooth.dem │ ├── sound.par │ ├── sound2.par │ ├── spline.dem │ ├── start.par │ ├── stat.inc │ ├── stats.dem │ ├── steps.dem │ ├── stringvar.dem │ ├── surface1.dem │ ├── surface2.dem │ ├── textcolor.dem │ ├── textrotate.dem │ ├── tics.dem │ ├── timedat.dem │ ├── transparent.dem │ ├── transparent_solids.dem │ ├── using.dem │ ├── utf8.dem │ ├── varcolor.dem │ ├── vector.dem │ ├── world.dem │ └── world2.dem └── xerrors /AUTHORS: -------------------------------------------------------------------------------- 1 | # This file lists authors for copyright purposes. This file is distinct from 2 | # the CONTRIBUTORS files. See the latter for an explanation. 3 | # 4 | # Names should be added to this file as: 5 | # Name or Organization 6 | # 7 | # The email address is not required for organizations. 8 | # 9 | # Please keep the list sorted. 10 | 11 | Jan Mercl <0xjnml@gmail.com> 12 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This file lists people who contributed code to this repository. The AUTHORS 2 | # file lists the copyright holders; this file lists people. 3 | # 4 | # Names should be added to this file like so: 5 | # Name 6 | # 7 | # Please keep the list sorted. 8 | 9 | Jan Mercl <0xjnml@gmail.com> 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 The Plot Authors. All rights reserved. 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are 5 | met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above 10 | copyright notice, this list of conditions and the following disclaimer 11 | in the documentation and/or other materials provided with the 12 | distribution. 13 | * Neither the names of the authors nor the names of the 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The Plot Authors. All rights reserved. 2 | # Use of this source code is governed by a BSD-style 3 | # license that can be found in the LICENSE file. 4 | 5 | .PHONY: all clean cover cpu editor internalError later mem nuke todo edit 6 | 7 | grep=--include=*.go --include=*.l --include=*.y --include=*.yy 8 | 9 | all: editor 10 | go vet || true 11 | golint || true 12 | make todo 13 | unused . || true 14 | gosimple . || true 15 | 16 | clean: 17 | go clean 18 | rm -f *~ cpu.test mem.test 19 | 20 | cover: 21 | t=$(shell tempfile) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t 22 | 23 | cpu: 24 | go test -c -o cpu.test 25 | ./cpu.test -noerr -test.cpuprofile cpu.out 26 | go tool pprof --lines cpu.test cpu.out 27 | 28 | edit: 29 | gvim -p Makefile scanner.l parser.yy *.go 30 | 31 | editor: scanner.go parser.go 32 | gofmt -l -s -w *.go 33 | go test -i 34 | go test ./... 2>&1 | tee log 35 | go install 36 | 37 | internalError: 38 | egrep -ho '"internal error.*"' *.go | sort | cat -n 39 | 40 | later: 41 | @grep -n $(grep) LATER * || true 42 | @grep -n $(grep) MAYBE * || true 43 | 44 | mem: 45 | go test -c -o mem.test 46 | ./mem.test -test.bench . -test.memprofile mem.out 47 | go tool pprof --lines --web --alloc_space mem.test mem.out 48 | 49 | parser.go scanner.go: parser.yy scanner.l xerrors 50 | go generate 2>&1 | tee log-generate 51 | 52 | nuke: clean 53 | go clean -i 54 | 55 | todo: 56 | @grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * || true 57 | @grep -nr $(grep) TODO * || true 58 | @grep -nr $(grep) BUG * || true 59 | @grep -nr $(grep) [^[:alpha:]]println * || true 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | `github.com/cznic/plot` has moved to [`modernc.org/plot`](https://godoc.org/modernc.org/plot) ([vcs](https://gitlab.com/cznic/plot)). 2 | 3 | Please update your import paths to `modernc.org/plot`. 4 | 5 | This repo is now archived. 6 | -------------------------------------------------------------------------------- /ast2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Plot Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package plot 6 | 7 | import ( 8 | "go/token" 9 | ) 10 | 11 | // Node represents an AST node or a xc.Token. 12 | type Node interface { 13 | Pos() token.Pos 14 | } 15 | 16 | type node token.Pos 17 | 18 | func (n node) Pos() token.Pos { return token.Pos(n) } 19 | 20 | // ----------------------------------------------------------------- Expression 21 | 22 | func (n *Expression) isDash() bool { 23 | if n == nil { 24 | return false 25 | } 26 | 27 | if n.Case != 24 { // UnaryExpression 28 | return false 29 | } 30 | 31 | u := n.UnaryExpression 32 | if u.Case != 0 { // PrimaryExpression 33 | return false 34 | } 35 | 36 | p := u.PrimaryExpression 37 | if p.Case != 0 { // Operand 38 | return false 39 | } 40 | 41 | o := p.Operand 42 | if o.Case != 3 { // STRING_LIT 43 | return false 44 | } 45 | 46 | return o.Token.Val == idDash 47 | } 48 | 49 | // ------------------------------------------------------------- NamedDataBlock 50 | 51 | func (n *NamedDataBlock) post(lx *lexer) { 52 | if n.Token.S()[0] != '$' { 53 | lx.err(n.Token, "data block names must start with '$'") 54 | return 55 | } 56 | 57 | if lx.lookahead.Rune != '\n' { 58 | lx.err(lx.lookahead, "extra characters after end-of-data delimiter") 59 | return 60 | } 61 | 62 | if data := lx.getInlineFiles(1, n.Token3.S()); len(data) == 1 { 63 | n.Data = data[0] 64 | } 65 | } 66 | 67 | // ----------------------------------------------------------------------- Plot 68 | 69 | func (n *Plot) post(lx *lexer) { 70 | var nn int 71 | for l := n.PlotElementList; l != nil; l = l.PlotElementList { 72 | item := l.PlotElementListItem 73 | if !item.Expression.isDash() { 74 | continue 75 | } 76 | 77 | nn++ 78 | opt := item.PlotElementModifiersListOpt 79 | if opt == nil { 80 | continue 81 | } 82 | 83 | for l := opt.PlotElementModifiersList; l != nil; l = l.PlotElementModifiersList { 84 | if i := l.PlotElementModifiersListItem; i.isBinary { 85 | lx.close(i, "cannot parse binary inline data") 86 | return 87 | } 88 | } 89 | } 90 | n.Data = lx.getInlineFiles(nn, []byte("e")) 91 | } 92 | 93 | // ----------------------------------------------------- SetPaletteSpecListItem 94 | 95 | func (n *SetPaletteSpecListItem) post(lx *lexer) { 96 | if !n.Expression.isDash() { 97 | return 98 | } 99 | 100 | if data := lx.getInlineFiles(1, []byte("e")); len(data) == 1 { 101 | n.Data = data[0] 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /etc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Plot Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package plot 6 | 7 | import ( 8 | "go/token" 9 | "reflect" 10 | "regexp" 11 | "strconv" 12 | "strings" 13 | 14 | "github.com/cznic/golex/lex" 15 | "github.com/cznic/strutil" 16 | "github.com/cznic/xc" 17 | ) 18 | 19 | const ( 20 | unicodePrivate = 0xe000 21 | ) 22 | 23 | var ( 24 | printHooks = strutil.PrettyPrintHooks{} 25 | shortcuts = map[int]int{} 26 | 27 | idDash = xc.Dict.SID("-") 28 | idDt = xc.Dict.SID("dt") 29 | idSkip = xc.Dict.SID("skip") 30 | idSum = xc.Dict.SID("sum") 31 | 32 | tokenRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_-]*$") 33 | ) 34 | 35 | func init() { 36 | for k, v := range xc.PrintHooks { 37 | printHooks[k] = v 38 | } 39 | lcRT := reflect.TypeOf(lex.Char{}) 40 | lcH := func(f strutil.Formatter, v interface{}, prefix, suffix string) { 41 | c := v.(lex.Char) 42 | r := c.Rune 43 | s := yySymName(int(r)) 44 | if x := s[0]; x >= '0' && x <= '9' { 45 | s = strconv.QuoteRune(r) 46 | } 47 | f.Format("%s%v: %s"+suffix, prefix, position(c.Pos()), s) 48 | } 49 | 50 | printHooks[lcRT] = lcH 51 | printHooks[reflect.TypeOf(xc.Token{})] = func(f strutil.Formatter, v interface{}, prefix, suffix string) { 52 | t := v.(xc.Token) 53 | if !t.Pos().IsValid() { 54 | return 55 | } 56 | 57 | lcH(f, t.Char, prefix, "") 58 | if s := xc.Dict.S(t.Val); len(s) != 0 { 59 | f.Format(" %q", s) 60 | } 61 | f.Format(suffix) 62 | return 63 | } 64 | } 65 | 66 | func init() { 67 | yyYLAT := map[int]int{} 68 | for k, v := range yyXLAT { 69 | yyYLAT[v] = k 70 | } 71 | syms := map[string]int{} 72 | for i, nm := range yySymNames { 73 | if nm == "" { 74 | continue 75 | } 76 | 77 | if !strings.HasPrefix(nm, "T_") { 78 | continue 79 | } 80 | 81 | syms[nm] = yyYLAT[i] 82 | } 83 | 84 | m := map[string][]int{} 85 | for _, nm := range yyTokenLiteralStrings { 86 | if !tokenRE.MatchString(nm) { 87 | continue 88 | } 89 | 90 | u := tokenName(nm) 91 | val, ok := syms[u] 92 | if !ok { 93 | continue 94 | } 95 | 96 | for nm != "" { 97 | m[nm] = append(m[nm], val) 98 | nm = nm[:len(nm)-1] 99 | } 100 | } 101 | 102 | for _, nm := range yyTokenLiteralStrings { 103 | if !tokenRE.MatchString(nm) { 104 | continue 105 | } 106 | 107 | u := tokenName(nm) 108 | val, ok := syms[u] 109 | if !ok { 110 | continue 111 | } 112 | 113 | m[nm] = []int{val} 114 | } 115 | 116 | for nm, val := range m { 117 | if len(val) == 1 { 118 | shortcuts[xc.Dict.SID(nm)] = val[0] 119 | } 120 | } 121 | } 122 | 123 | func tokenName(lit string) string { 124 | b := []byte("T_") 125 | for i := 0; i < len(lit); i++ { 126 | switch c := lit[i]; { 127 | case c >= 'a' && c <= 'z' || c >= '0' && c <= '9': 128 | b = append(b, c) 129 | case c >= 'A' && c <= 'Z': 130 | b = append(b, '_', c) 131 | case c == '_': 132 | b = append(b, "__"...) 133 | case c == '-': 134 | b = append(b, "_d"...) 135 | default: 136 | panic("internal error") 137 | } 138 | } 139 | return strings.ToUpper(string(b)) 140 | } 141 | 142 | // PrettyString returns pretty formatted strings of things produced by this package. 143 | func PrettyString(v interface{}) string { return strutil.PrettyString(v, "", "", printHooks) } 144 | 145 | func position(pos token.Pos) token.Position { return xc.FileSet.Position(pos) } 146 | 147 | // Bindings map name IDs to declaration nodes. 148 | type Bindings struct { 149 | Map map[int]Node 150 | Parent *Bindings 151 | } 152 | 153 | func newBindings(parent *Bindings) *Bindings { 154 | return &Bindings{ 155 | Map: map[int]Node{}, 156 | Parent: parent, 157 | } 158 | } 159 | 160 | func (b *Bindings) declare(nm xc.Token, node Node) { 161 | b.Map[nm.Val] = node 162 | } 163 | 164 | func (b *Bindings) Lookup(nm int) Node { 165 | for b != nil { 166 | if n := b.Map[nm]; n != nil { 167 | return n 168 | } 169 | 170 | b = b.Parent 171 | } 172 | return nil 173 | } 174 | 175 | func preprocessString(s string) string { 176 | runes := []rune(s) 177 | w := 0 178 | for r := 0; r < len(runes); { 179 | c := runes[r] 180 | r++ 181 | switch c { 182 | case '\\': 183 | if r == len(runes) { 184 | break 185 | } 186 | 187 | c := runes[r] 188 | r++ 189 | switch c { 190 | case '\'': 191 | runes[w] = c 192 | w++ 193 | case '`': 194 | runes[w] = unicodePrivate 195 | w++ 196 | default: 197 | runes[w] = '\\' 198 | w++ 199 | runes[w] = c 200 | w++ 201 | } 202 | default: 203 | runes[w] = c 204 | w++ 205 | } 206 | } 207 | return string(runes[:w]) 208 | } 209 | 210 | func postprocessString(s string) string { return strings.Replace(s, string(unicodePrivate), "`", -1) } 211 | -------------------------------------------------------------------------------- /scanner.l: -------------------------------------------------------------------------------- 1 | %{ 2 | // Copyright 2016 The Plot Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | %} 6 | 7 | %yyc c 8 | %yyn c = lx.Next() 9 | %yym lx.Mark() 10 | 11 | %{ 12 | package plot 13 | 14 | func (lx *lexer) scan() int { 15 | c := lx.Enter() 16 | %} 17 | 18 | /* Non ASCII character classes */ 19 | eof \x80 20 | other \x81 21 | 22 | any_to_eol [^\x80\n\r]* 23 | big_u_value \\U{hex_digit}{hex_digit}{hex_digit}{hex_digit}{hex_digit}{hex_digit}{hex_digit}{hex_digit} 24 | byte_value {octal_byte_value}|{hex_byte_value} 25 | decimal_digit [0-9] 26 | decimal_lit [1-9]{decimal_digit}* 27 | decimals {decimal_digit}+ 28 | escaped_char \\[abfnrtv'`\x22\\] 29 | exponent [eE][+-]?{decimals}* 30 | float_lit {decimals}"."{decimals}?{exponent}?|{decimals}{exponent}|"."{decimals}{exponent}? 31 | hex_byte_value \\x{hex_digit}?{hex_digit}? 32 | hex_digit [0-9a-fA-F] 33 | hex_lit 0[xX]{hex_digit}+ 34 | ident ({ident_first}|"$"){ident_next}* 35 | ident_first [A-Za-z_] 36 | ident_next {ident_first}|[0-9] 37 | int_lit {decimal_lit}|{octal_lit}|{hex_lit} 38 | interpreted_string_lit \x22({str_unicode_value}|{byte_value})*\x22 39 | little_u_value \\u{hex_digit}{hex_digit}{hex_digit}{hex_digit} 40 | nonzero-digit [1-9] 41 | number {int_lit}|{float_lit} 42 | octal-constant 0{octal-digit}* 43 | octal-digit [0-7] 44 | octal_byte_value \\{octal_digit}{octal_digit}?{octal_digit}? 45 | octal_digit [0-7] 46 | octal_lit 0{octal_digit}* 47 | raw_string_lit '[^'\x80]*' 48 | str_unicode_value [^\x22\x80\n\r\\]|{little_u_value}|{big_u_value}|{escaped_char} 49 | string_lit {raw_string_lit}|{interpreted_string_lit} 50 | 51 | %% 52 | c = lx.Rule0() 53 | 54 | /* Whitespace */ 55 | [ \t\r]+ 56 | 57 | /* Line comment */ 58 | "#"{any_to_eol} 59 | 60 | /* Command substitution */ 61 | `[^`\x80]*` 62 | lx.substitute() 63 | 64 | "!=" return NOTEQ 65 | "&&" return ANDAND 66 | "**" return EXP 67 | "<<" return LSH 68 | "<=" return LEQ 69 | "==" return EQEQ 70 | ">=" return GEQ 71 | ">>" return RSH 72 | "||" return OROR 73 | 74 | @{ident} return MACRO 75 | {ident} return IDENTIFIER 76 | {number} return NUM_LIT 77 | {string_lit} return lx.expandStringLiteral() 78 | 79 | %% 80 | if c, ok := lx.Abort(); ok { 81 | return c 82 | } 83 | 84 | goto yyAction 85 | } 86 | -------------------------------------------------------------------------------- /testdata/example.gp: -------------------------------------------------------------------------------- 1 | set term dumb 2 | plot [-5:6.5] sin(x) with impulse ls -1 3 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/Copyright: -------------------------------------------------------------------------------- 1 | /*[ 2 | * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley 3 | * 4 | * Permission to use, copy, and distribute this software and its 5 | * documentation for any purpose with or without fee is hereby granted, 6 | * provided that the above copyright notice appear in all copies and 7 | * that both that copyright notice and this permission notice appear 8 | * in supporting documentation. 9 | * 10 | * Permission to modify the software is granted, but not the right to 11 | * distribute the complete modified source code. Modifications are to 12 | * be distributed as patches to the released version. Permission to 13 | * distribute binaries produced by compiling modified sources is granted, 14 | * provided you 15 | * 1. distribute the corresponding source modifications from the 16 | * released version in the form of a patch file along with the binaries, 17 | * 2. add special version identification to distinguish your version 18 | * in addition to the base release version number, 19 | * 3. provide your name and address as the primary contact for the 20 | * support of your modified version, and 21 | * 4. retain our contact information in regard to use of the base 22 | * software. 23 | * Permission to distribute the released version of the source code along 24 | * with corresponding source modifications in the form of a patch file is 25 | * granted with same provisions 2 through 4 for binary distributions. 26 | * 27 | * This software is provided "as is" without express or implied warranty 28 | * to the extent permitted by applicable law. 29 | ]*/ 30 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/animate.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: animate.dem,v 1.7 2006/01/07 23:21:02 sfeam Exp $ 3 | # 4 | # Demo animation, tumbling around 'glass.dat'. 5 | # 6 | # History: 7 | # - 1. 1. 2006 Dan Sebald: Defined variables for more generic rotate 8 | # - ?. ?. ? Hans-Bernhard Broeker: Changed from rotating whale to 9 | # rotating glass 10 | # - ?. ?. ? ?: Initial tumbling whale demo 11 | 12 | set parametric 13 | set hidden3d 14 | unset key 15 | set style data line 16 | xrot=60 17 | xrot_delta = 17 18 | zrot=0 19 | zrot_delta = 10 20 | xview(xrot)=(50.+30.*sin((xrot%180)/180.*pi)) 21 | zview(zrot)=(60.+45.*sin(zrot/180.*pi)) 22 | set view xview(xrot),zview(zrot) 23 | splot "glass.dat" 24 | 25 | limit_iterations=40 # limits number of iterations if nonzero 26 | 27 | if (!limit_iterations) print "The following animation will never stop on its own. You have" 28 | if (!limit_iterations) print "to stop it manually by interrupting gnuplot (e.g., press ^C)" 29 | print "On some screen terminal drivers for PC screens, you'll have" 30 | print "to hit a key to get to the next frame" 31 | 32 | pause -1 "Press a key to start the rotation..." 33 | 34 | iteration_count=0 35 | load "gnuplot.rot" 36 | reset 37 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/animate2.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: animate2.dem,v 1.2 2012/02/15 03:38:19 sfeam Exp $ 3 | # 4 | # demo for creating GIF animation and illustrating saving images to 5 | # file one pixel to one pixel 6 | # 7 | # A combination of what was animate.dem and world2.dem with the 8 | # addition of saving the rotated image to an animated GIF. 9 | # Requires GIF_ANIMATION 10 | # 11 | # History: 12 | # - 1. 3. 2006 Dan Sebald: 1st version 13 | # 07 Jan 2006 Ethan Merritt: Revise to assume terminal type is set by caller 14 | # 15 | 16 | # Caller must set terminal type. 17 | # Example of intended use: 18 | # set term gif animate transparent opt delay 10 size 200,200 background rgb 'black' 19 | 20 | unset title 21 | unset key 22 | unset xtics 23 | unset ytics 24 | unset ztics 25 | set border 0 26 | set hidden3d nooffset 27 | set parametric 28 | set angles degrees 29 | set samples 64,64 30 | set isosamples 13,13 31 | set mapping spherical 32 | set dummy u,v 33 | set urange [ -90.0000 : 90.0000 ] noreverse nowriteback 34 | set vrange [ 0.00000 : 360.000 ] noreverse nowriteback 35 | set style data line 36 | 37 | # Defines for gnuplot.rot script 38 | limit_iterations=72 39 | xrot=60 40 | xrot_delta = 0 41 | zrot=136 42 | zrot_delta = 355 43 | xview(xrot)=xrot 44 | zview(zrot)=zrot 45 | set view xview(xrot), zview(zrot), 2, 1 46 | set size square 47 | 48 | splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \ 49 | 'world.dat' notitle with lines lt 2 lw 3 50 | 51 | iteration_count=0 52 | xrot =(xrot+xrot_delta)%360 53 | zrot =(zrot+zrot_delta)%360 54 | 55 | load "gnuplot.rot" 56 | 57 | pause -1 "Hit return to continue" 58 | 59 | reset 60 | 61 | print "End of animate2 demo..." 62 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/approximate.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Show use of pseudodata mechanism '+' to use plot styles with more than 3 | # one relevant value per x coordinate. In this example we use the style 4 | # "filledcurves" to show the difference between two analytic functions. 5 | # This corresponds to the specification of multiple columns in the 6 | # 'using' option for input from data files. 7 | # 8 | # 9 | approx_1(x) = x - x**3/6 10 | approx_2(x) = x - x**3/6 + x**5/120 11 | approx_3(x) = x - x**3/6 + x**5/120 - x**7/5040 12 | 13 | label1 = "x - {x^3}/3!" 14 | label2 = "x - {x^3}/3! + {x^5}/5!" 15 | label3 = "x - {x^3}/3! + {x^5}/5! - {x^7}/7!" 16 | 17 | # 18 | set termoption enhanced 19 | save_encoding = GPVAL_ENCODING 20 | set encoding utf8 21 | # 22 | set title "Polynomial approximation of sin(x)" 23 | set key Left center top reverse 24 | set xrange [ -3.2 : 3.2 ] 25 | set xtics ("-π" -pi, "-π/2" -pi/2, 0, "π/2" pi/2, "π" pi) 26 | set format y "%.1f" 27 | set samples 500 28 | set style fill solid 0.4 noborder 29 | 30 | plot '+' using 1:(sin($1)):(approx_1($1)) with filledcurve title label1 lt 3, \ 31 | '+' using 1:(sin($1)):(approx_2($1)) with filledcurve title label2 lt 2, \ 32 | '+' using 1:(sin($1)):(approx_3($1)) with filledcurve title label3 lt 1, \ 33 | sin(x) with lines lw 1 lc rgb "black" 34 | 35 | pause -1 "Hit return to continue" 36 | 37 | set encoding save_encoding 38 | reset 39 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/arrowstyle.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: arrowstyle.dem,v 1.5 2014/03/09 20:14:17 markisch Exp $ 3 | # 4 | # 5 | set xrange [-1000:1000] 6 | set yrange [-178:86] 7 | set tics scale 0 8 | 9 | set style line 1 lt 1 lw 2 10 | set style line 2 lt 3 lw 2 11 | 12 | set style arrow 1 head filled size screen 0.025,30,45 ls 1 13 | set style arrow 2 head nofilled size screen 0.03,15 ls 2 14 | set style arrow 3 head filled size screen 0.03,15,45 ls 1 15 | set style arrow 4 head filled size screen 0.03,15 ls 2 16 | set style arrow 5 heads noborder size screen 0.03,15,135 ls 1 17 | set style arrow 6 head empty size screen 0.03,15,135 ls 2 18 | set style arrow 7 nohead ls 1 19 | set style arrow 8 heads size screen 0.008,90 ls 2 20 | 21 | print ' We have defined the following arrowstyles:' 22 | show style arrow 23 | 24 | set for [i=1:8] arrow from -500, (-90 - i * 10) to 500, (-90 - i * 10) as i 25 | set for [i=1:8] label sprintf('arrowstyle %i:', i) at -520, (-90 - i * 10) right 26 | 27 | set samples 50 28 | set angles rad 29 | pos(x) = 69 * sin(0.01 * x) 30 | len(x) = 49 * sin(0.01 * x + pi/2) 31 | 32 | do for [i=1:8] { 33 | set title sprintf('Top: plot with vectors arrowstyle %i, Bottom: explicit arrows', i) 34 | plot '+' using 1:(pos(x)):(0):(len(x)) notitle with vectors arrowstyle i 35 | pause -1 "Hit return to continue" 36 | } 37 | #reset 38 | 39 | # 40 | # Show plot with data style vectors 41 | # 42 | set title "Plot 'file' with vectors " 43 | set key box opaque 44 | set xrange [*:*] 45 | set yrange [*:10] 46 | set for [i=1:8] style arrow i lc i 47 | plot '1.dat' using 1:2:(+1):(+1) with vectors lt 4 filled title 'filled', \ 48 | '2.dat' using 1:2:(+1):(+1) with vectors lt 1 heads title 'double-headed', \ 49 | '2.dat' using ($1):(2-$2/3):(+1):(+2.5):(int($0)%8 + 1) with vectors as var ti 'arrowstyle variable' 50 | # 51 | pause -1 "Hi return to continue" 52 | # 53 | reset 54 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/autoscale.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: autoscale.dem,v 1.2 2014/01/17 06:02:21 sfeam Exp $ 3 | # Demo of constraint autoscaling: Autoscaling with limits. 4 | # 5 | 6 | set multiplot layout 2, 2 title "Autoscaling with constraints (y-axis always unaffected)" 7 | 8 | unset key 9 | # set title offset 0,-0.4 10 | # set xlabel offset 0,0.4 11 | 12 | set ytics 5 13 | 14 | set title "unconstrained" 15 | set ylabel "[*:*]" 16 | set yrange [*:*] 17 | set xlabel "[*:*]" 18 | set xrange [*:*] 19 | plot "3.dat" 20 | 21 | set title "minimum range guaranteed" 22 | set ylabel "[*<-5:5<*]" 23 | set yrange [*<-5:5<*] 24 | set xlabel "[*<-40:30<*]" 25 | set xrange [*<-40:30<*] 26 | plot "3.dat" 27 | 28 | set title "clip to maximum range" 29 | set ylabel "[-20<*:*<20]" 30 | set yrange [-20<*:*<20] 31 | set xlabel "[-30<*:*<10]" 32 | set xrange [-30<*:*<10] 33 | plot "3.dat" 34 | 35 | set title "mixed" 36 | set xlabel "[-30<*<10:10<*<15]" 37 | set xrange [-30<*<10:10<*<15] 38 | set ylabel "[*:0<*<10]" 39 | set yrange [*:0<*<10] 40 | plot "3.dat" 41 | 42 | unset multiplot 43 | 44 | pause -1 "Hit return to continue" 45 | 46 | 47 | set multiplot layout 2, 2 title "Autoscaling with constraints (x-axis always unaffected)" 48 | 49 | unset key 50 | set ytics 5 51 | 52 | set title "unconstrained" 53 | set ylabel "[*:*]" 54 | set yrange [*:*] 55 | set xlabel "[*:*]" offset 0, 0.4 56 | set xrange [*:*] 57 | plot "3.dat" 58 | 59 | set title "minimum range guaranteed" 60 | set ylabel "[*<-15:20<*]" 61 | set yrange [*<-15:20<*] 62 | set xlabel "[*<-10:10<*]" 63 | set xrange [*<-10:10<*] 64 | plot "3.dat" 65 | 66 | set ytics 2 67 | 68 | set title "clip to maximum range" 69 | set ylabel "[-8<*:*<5]" 70 | set yrange [-8<*:*<5] 71 | set xlabel "[-40<*:*<30]" 72 | set xrange [-40<*:*<30] 73 | plot "3.dat" 74 | 75 | set title "mixed" 76 | set xlabel "[-30<*<10:-10<*<45]" 77 | set xrange [-30<*<10:-10<*<45] 78 | set ylabel "[-8<*<-6:7<*<9]" 79 | set yrange [-8<*<-6:7<*<9] 80 | plot "3.dat" 81 | 82 | unset multiplot 83 | 84 | pause -1 "Hit return to continue" 85 | unset xlabel 86 | unset ylabel 87 | 88 | set multiplot layout 2, 2 title "Autoscaling with constraints" 89 | 90 | set ytics 50 91 | 92 | set autoscale xy 93 | set title "autoscale xy" 94 | plot "silver.dat" 95 | 96 | set yrange [15<*<25:*] 97 | set title "set yrange [15<*<25:*]" 98 | plot "silver.dat" 99 | 100 | set autoscale ymin 101 | set title "set autoscale ymin" 102 | plot "silver.dat" 103 | 104 | set ytics 20 105 | set yrange [15<*<25:135<*<225] 106 | set title "set yrange [15<*<25:135<*<225]" 107 | plot "silver.dat" 108 | 109 | unset multiplot 110 | 111 | pause -1 "Hit return to continue" 112 | reset 113 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/barchart_art.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo of using rescaled images to construct a bar chart 3 | # 4 | if (!strstrt(GPVAL_COMPILE_OPTIONS,"+GD_PNG")) \ 5 | print ">>> Skipping demo <<<\n" ; \ 6 | print "This copy of gnuplot was built without support for loading png images" ;\ 7 | exit ; 8 | 9 | reset 10 | set title "Building Code Height Limits" 11 | unset key 12 | 13 | set xrange [ -10 : 160 ] 14 | set yrange [ 0 : 200 ] 15 | set y2range[ 0 : 200 ] 16 | 17 | set y2tics 18 | set grid y 19 | 20 | set xtics ("NE" 12.0, "S" 42.0, "Downtown" 72.0, "Suburbs" 127.0) scale 0.0 21 | 22 | plot 'bldg.png' binary filetype=png origin=(60,0) dx=0.5 dy=1.5 with rgbimage, \ 23 | 'bldg.png' binary filetype=png origin=(0,0) dx=0.5 dy=1 with rgbimage, \ 24 | 'bldg.png' binary filetype=png origin=(30,0) dx=0.5 dy=0.7 with rgbimage, \ 25 | 'bldg.png' binary filetype=png origin=(100,0) dx=0.5 dy=0.35 with rgbimage, \ 26 | 'bldg.png' binary filetype=png origin=(125,0) dx=0.5 dy=0.35 with rgbimage 27 | 28 | pause -1 "Hit return to continue" 29 | reset 30 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/binary.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: binary.dem,v 1.5 2003/10/28 05:35:54 sfeam Exp $ 3 | # 4 | set style data lines 5 | set hidden3d 6 | set title "Hidden line removal of explicit binary surfaces" 7 | set ticslevel 0 8 | set key box 9 | 10 | set xrange [-3:3] 11 | set yrange [-2:2] 12 | splot "binary1" binary 13 | pause -1 "Hit return to continue (1)" 14 | 15 | set view 70,45 16 | set xrange [-3:3] 17 | set yrange [-3:3] 18 | splot "binary2" binary 19 | pause -1 "Hit return to continue (2)" 20 | 21 | set title "Notice that sampling rate can change" 22 | set vi 70,10 23 | set xrange [-3:6] 24 | set yrange [-3:6] 25 | splot "binary3" binary 26 | pause -1 "Hit return to continue (3)" 27 | 28 | reset 29 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/bivariat.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: bivariat.dem,v 1.9 2011/08/01 05:14:23 sfeam Exp $ 3 | # 4 | # This demo is very slow and requires unusually large stack size. 5 | # Do not attempt to run this demo under MSDOS. 6 | # 7 | 8 | # the function integral_f(x) approximates the integral of f(x) from 0 to x. 9 | # integral2_f(x,y) approximates the integral from x to y. 10 | # define f(x) to be any single variable function 11 | # 12 | # the integral is calculated using Simpson's rule as 13 | # ( f(x-delta) + 4*f(x-delta/2) + f(x) )*delta/6 14 | # repeated x/delta times (from x down to 0) 15 | # 16 | delta = 0.2 17 | # delta can be set to 0.025 for non-MSDOS machines 18 | # 19 | # integral_f(x) takes one variable, the upper limit. 0 is the lower limit. 20 | # calculate the integral of function f(t) from 0 to x 21 | # choose a step size no larger than delta such that an integral number of 22 | # steps will cover the range of integration. 23 | integral_f(x) = (x>0)?int1a(x,x/ceil(x/delta)):-int1b(x,-x/ceil(-x/delta)) 24 | int1a(x,d) = (x<=d*.1) ? 0 : (int1a(x-d,d)+(f(x-d)+4*f(x-d*.5)+f(x))*d/6.) 25 | int1b(x,d) = (x>=-d*.1) ? 0 : (int1b(x+d,d)+(f(x+d)+4*f(x+d*.5)+f(x))*d/6.) 26 | # 27 | # integral2_f(x,y) takes two variables; x is the lower limit, and y the upper. 28 | # calculate the integral of function f(t) from x to y 29 | integral2_f(x,y) = (xy-d*.5) ? 0 : (int2(x+d,y,d) + (f(x)+4*f(x+d*.5)+f(x+d))*d/6.) 32 | 33 | set autoscale 34 | set title "approximate the integral of functions" 35 | set samples 50 36 | set key bottom right 37 | 38 | f(x) = exp(-x**2) 39 | 40 | plot [-5:5] f(x) title "f(x)=exp(-x**2)", \ 41 | 2/sqrt(pi)*integral_f(x) title "erf(x)=2/sqrt(pi)*integral_f(x)", \ 42 | erf(x) with points 43 | 44 | pause -1 "Hit return to continue" 45 | 46 | f(x)=cos(x) 47 | 48 | plot [-5:5] f(x) title "f(x)=cos(x)", integral_f(x) 49 | 50 | pause -1 "Hit return to continue" 51 | 52 | set title "approximate the integral of functions (upper and lower limits)" 53 | 54 | f(x)=(x-2)**2-20 55 | 56 | plot [-10:10] f(x) title "f(x)=(x-2)**2-20", integral2_f(-5,x) 57 | 58 | pause -1 "Hit return to continue" 59 | 60 | f(x)=sin(x-1)-.75*sin(2*x-1)+(x**2)/8-5 61 | 62 | plot [-10:10] f(x) title "f(x)=sin(x-1)-0.75*sin(2*x-1)+(x**2)/8-5", integral2_f(x,1) 63 | 64 | pause -1 "Hit return to continue" 65 | 66 | # 67 | # This definition computes the ackermann. Do not attempt to compute its 68 | # values for non integral values. In addition, do not attempt to compute 69 | # its beyond m = 3, unless you want to wait really long time. 70 | 71 | ack(m,n) = (m == 0) ? n + 1 : (n == 0) ? ack(m-1,1) : ack(m-1,ack(m,n-1)) 72 | 73 | set xrange [0:3] 74 | set yrange [0:3] 75 | 76 | set isosamples 4 77 | set samples 4 78 | 79 | set title "Plot of the ackermann function" 80 | 81 | splot ack(x, y) 82 | 83 | pause -1 "Hit return to continue" 84 | 85 | set xrange [-5:5] 86 | set yrange [-10:10] 87 | set isosamples 10 88 | set samples 100 89 | set key top right at 4,-3 90 | set title "Min(x,y) and Max(x,y)" 91 | 92 | # 93 | min(x,y) = (x < y) ? x : y 94 | max(x,y) = (x > y) ? x : y 95 | 96 | plot sin(x), x**2, x**3, max(sin(x), min(x**2, x**3))+0.5 97 | 98 | pause -1 "Hit return to continue" 99 | 100 | # 101 | # gcd(x,y) finds the greatest common divisor of x and y, 102 | # using Euclid's algorithm 103 | # as this is defined only for integers, first round to the nearest integer 104 | gcd(x,y) = gcd1(rnd(max(x,y)),rnd(min(x,y))) 105 | gcd1(x,y) = (y == 0) ? x : gcd1(y, x - x/y * y) 106 | rnd(x) = int(x+0.5) 107 | 108 | set samples 59 109 | set xrange [1:59] 110 | set auto 111 | set key default 112 | 113 | set title "Greatest Common Divisor (for integers only)" 114 | 115 | plot gcd(x, 60) with impulses 116 | pause -1 "Hit return to continue" 117 | 118 | # 119 | # This definition computes the sum of the first 10, 100, 1000 fourier 120 | # coefficients of a (particular) square wave. 121 | 122 | set title "Finite summation of 10, 100, 1000 fourier coefficients" 123 | 124 | set samples 500 125 | set xrange [-10:10] 126 | set yrange [-0.4:1.2] 127 | set key bottom right 128 | 129 | fourier(k, x) = sin(3./2*k)/k * 2./3*cos(k*x) 130 | sum10(x) = 1./2 + sum [k=1:10] fourier(k, x) 131 | sum100(x) = 1./2 + sum [k=1:100] fourier(k, x) 132 | sum1000(x) = 1./2 + sum [k=1:1000] fourier(k, x) 133 | 134 | plot \ 135 | sum10(x) title "1./2 + sum [k=1:10] sin(3./2*k)/k * 2./3*cos(k*x)", \ 136 | sum100(x) title "1./2 + sum [k=1:100] sin(3./2*k)/k * 2./3*cos(k*x)", \ 137 | sum1000(x) title "1./2 + sum [k=1:1000] sin(3./2*k)/k * 2./3*cos(k*x)" 138 | pause -1 "Hit return to continue" 139 | 140 | reset 141 | 142 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/bolditalic.dem: -------------------------------------------------------------------------------- 1 | set polar 2 | unset xtics 3 | unset ytics 4 | unset key 5 | set border 0 6 | 7 | set title "{/:Bold Enhanced text style markup}" 8 | set x2label "Default {/Times:Bold=15 Bold ^{/:Italic Italic}} Default" offset 0,-2 9 | set xlabel 'Default {/Times=18:Italic Italic _{/:Bold Bold} ^{/:Normal Normal}} Default' 10 | 11 | plot [t=0:4*pi] t with lines 12 | pause -1 "Hit return to continue" 13 | reset 14 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/borders.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: borders.dem,v 1.11 2012/01/09 05:05:28 sfeam Exp $ 3 | # 4 | unset grid 5 | set xrange [0:10] 6 | set yrange [0:10] 7 | set format "" 8 | # 9 | set multiplot layout 4, 4 title "Demonstration of different border settings" 10 | do for [bb = 0:15] { 11 | set border bb 12 | show border 13 | set label 1 sprintf("Border = %.0f",bb) at 5,5 center 14 | plot 1/0 notitle 15 | } 16 | unset multiplot 17 | 18 | pause -1 "Hit return to continue" 19 | 20 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/boxplot.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Boxplot demo 3 | # 4 | reset 5 | 6 | print "*** Boxplot demo ***" 7 | 8 | set style fill solid 0.25 border -1 9 | set style boxplot outliers pointtype 7 10 | set style data boxplot 11 | set boxwidth 0.5 12 | set pointsize 0.5 13 | 14 | unset key 15 | set border 2 16 | set xtics ("A" 1, "B" 2) scale 0.0 17 | set xtics nomirror 18 | set ytics nomirror 19 | set yrange [0:100] 20 | 21 | plot 'silver.dat' using (1):2, '' using (2):(5*$3) 22 | 23 | pause -1 'Hit to continue: Compare sub-datasets' 24 | 25 | # Comparing sub-datasets 26 | 27 | set xtics auto 28 | set yrange [*:*] 29 | set title "Distribution of energy usage of the continents, grouped by type of energy source\n" 30 | set ylabel "Billion Tons of Oil Equivalent" 31 | 32 | plot 'energy_circles.dat' using (1):($8/1.e6):(0):4 33 | 34 | pause -1 'Hit to continue: Sort factors alphabetically' 35 | 36 | # Sort factors alphabetically 37 | 38 | set style boxplot sorted 39 | 40 | replot 41 | 42 | pause -1 'Hit to continue: The same, with iteration and manual filtering' 43 | 44 | # The same as above, with manual filtering 45 | # Note that you have to specify the factors and you have to set the xtics as well. 46 | # However, you have greater control over the appearance of the plot 47 | # e.g. the order of the boxplots, their colors, the tic labels 48 | # The previous form is intended for interactive usage while the latter form is better suited 49 | # to creating publication-ready graphs. 50 | 51 | factors = "Coal Gas Hydroelectric Nuclear Oil Renewable" 52 | n_f = words(factors) 53 | set xtic ("" 1) 54 | set for [i=1:n_f] xtics add (word(factors,i) i) 55 | 56 | t(x) = x/1.e6 57 | filter(col, factor_col, level) = (strcol(factor_col) eq word(factors, level)) ? t(column(col)) : 1/0 58 | 59 | plot for [i=1:n_f] 'energy_circles.dat' using (i):(filter(8, 4, i)) 60 | 61 | pause -1 'Hit to continue: boxplot demo finished' 62 | 63 | 64 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/callargs.dem: -------------------------------------------------------------------------------- 1 | # 2 | # This script exercises the ARG* variable-passing mechanism 3 | # used by the "call" command. Note that the only difference between 4 | # "load" and "call" is that "load" has no parameters (ARGC = 0). 5 | # 6 | if (!exists("ARGC")) { 7 | print "This copy of gnuplot does not support the ARG call method" 8 | exit 9 | } 10 | print "\nEntering ", ARG0, " with ", ARGC, " parameters" 11 | if (ARGC == 0) { 12 | undefine FOO 13 | BAZ = 5.67 14 | NOTAFUNCTION = "a string" 15 | print "Now exercise the call mechanism at line ", GPVAL_LINENO 16 | call ARG0 1.23e4 "string constant" FOO BAZ "3 + log(BAZ)" NOTAFUNCTION (1+3+4) 17 | } else { 18 | print "\n\tTest whether this copy of gnuplot also supports deprecated" 19 | print "\tcall parameter syntax "."$"."0 "."$"."1 "."$"."2 "."etc: " 20 | print "\t\t", exists("$3") ? "yes" : "no" 21 | show variable ARG 22 | print "ARG1 (numerical constant) came through as ", ARG1 23 | print " @ARG1 = ", @ARG1 24 | print " (ARG1 == @ARG1) is ", (ARG1 == @ARG1) ? "TRUE" : "FALSE" 25 | print "ARG2 (string constant) came through as ", ARG2 26 | print " words(ARG2) = ", words(ARG2) 27 | print "ARG3 (undefined variable FOO) came through as ", ARG3 28 | print "ARG4 (numerical variable BAZ=5.67) came through as ", ARG4 29 | print " @ARG4 = ", @ARG4 30 | print "ARG5 (quoted expression) came through as ", ARG5 31 | print " @ARG5 = ", @ARG5 32 | print "ARG6 (string variable) came through as ", ARG6 33 | print " words(ARG6) = ", words(ARG6) 34 | print "ARG7 (expression) came through as ", ARG7 35 | } 36 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/candlesticks.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: candlesticks.dem,v 1.5 2008/05/31 05:19:01 sfeam Exp $ 3 | # 4 | 5 | reset 6 | # 7 | set xrange [0:11] 8 | set yrange [0:10] 9 | # 10 | set title "candlesticks with open boxes (default)" 11 | plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks 12 | # 13 | pause -1 "Hit return to continue" 14 | # 15 | set title "candlesticks with specified boxwidth" 16 | set boxwidth 0.2 17 | replot 18 | # 19 | pause -1 "Hit return to continue" 20 | # 21 | set title "candlesticks with style fill solid" 22 | set style fill solid 23 | set boxwidth 0.2 24 | replot 25 | # 26 | pause -1 "Hit return to continue" 27 | # 28 | set title "candlesticks showing both states of open/close" 29 | set style fill empty 30 | set boxwidth 0.2 31 | plot 'candlesticks.dat' using 1:(int($0)%3?$3:$5):2:6:(int($0)%3?$5:$3) with candlesticks title "open < close", \ 32 | NaN with boxes lt 1 fs solid 1 title "close < open" 33 | # 34 | pause -1 "Hit return to continue" 35 | # 36 | set title "box-and-whisker plot adding median value as bar" 37 | set style fill empty 38 | plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles', \ 39 | '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle 40 | # 41 | pause -1 "Hit return to continue" 42 | # 43 | set title "box-and-whisker with median bar and whiskerbars" 44 | plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles' whiskerbars, \ 45 | '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle 46 | pause -1 "Hit return to continue" 47 | # 48 | 49 | reset 50 | 51 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/cerf.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Exercise the special functions in external library libcerf. 3 | # These are only present if libcerf was found during configuration/build 4 | # of the current gnuplot executable. 5 | # 6 | if (!strstrt(GPVAL_COMPILE_OPTIONS,"+LIBCERF")) { 7 | print "This copy of gnuplot was not linked against libcerf" 8 | exit; 9 | } 10 | 11 | save_encoding = GPVAL_ENCODING 12 | set encoding utf8 13 | 14 | set title "Voigt Profile VP(x,σ,γ)" 15 | set xrange [-10:10] 16 | set yrange [0.0:0.3] 17 | set xtics out nomirror 18 | set ytics in mirror format "%.2f" 19 | set mxtics 20 | set mytics 21 | set sample 200 22 | 23 | plot VP(x,1.53,0.0) title "σ=1.53 γ=0.00", \ 24 | VP(x,1.30,0.5) title "σ=1.30 γ=0.50", \ 25 | VP(x,1.00,1.0) title "σ=1.00 γ=1.00", \ 26 | VP(x,0.00,1.8) title "σ=0.00 γ=1.80" 27 | 28 | pause -1 " to continue" 29 | 30 | set yrange [-1:1] 31 | set title "Faddeeva/Voigt Function" 32 | set key samplen 0.5 33 | 34 | plot real( faddeeva(x) ) lw 2, \ 35 | imag( faddeeva(x) ) lw 2, \ 36 | real(cdawson(x)) lt -1 lw 0.5 title "Dawson's Integral" 37 | 38 | pause -1 " to continue" 39 | 40 | reset 41 | unset key 42 | set view map 43 | set bmargin at screen 0.1 44 | set sample 200 45 | set isosamples 200, 200 46 | set size ratio 1 1,1 47 | set cbtics ("0" -pi, "2π" pi) 48 | set title "Complex error function cerf( x + iy )" 49 | set xrange [ -3 : 3 ] 50 | set yrange [ -3 : 3 ] 51 | set tics scale 0 52 | set cblabel "Phase Angle" 53 | set cblabel offset character -2, 0, 0 font "" textcolor lt -1 rotate by -270 54 | set cbrange [ -pi : pi ] noreverse nowriteback 55 | 56 | set contour 57 | set cntrparam levels discrete 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, 100, 200, 500 58 | set cntrlabel onecolor 59 | 60 | set palette positive nops_allcF maxcolors 0 gamma 1.5 color model HSV 61 | set palette defined ( 0 0 1 1, 1 1 1 1 ) 62 | 63 | Hue(x,y) = (pi + atan2(-y,-x)) / (2*pi) 64 | phase(x,y) = hsv2rgb( Hue(x,y), sqrt(x**2+y**2), 1. ) 65 | rp(x,y) = real(f(x,y)) 66 | ip(x,y) = imag(f(x,y)) 67 | color(x,y) = hsv2rgb( Hue( rp(x,y), ip(x,y) ), abs(f(x,y)), 1. ) 68 | f(x,y) = cerf(x+y*{0,1}) 69 | 70 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable nocontour, \ 71 | '++' using 1:2:(abs(cerf($1+$2*{0,1}))) with lines nosurf lt -1 72 | 73 | pause -1 " to continue" 74 | reset 75 | set encoding save_encoding 76 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/charset.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Dump all (8-bit) characters by octal code value 3 | # 4 | set title "Complete dump of characters for this font and encoding" 5 | # 6 | set border 0 7 | unset xtics 8 | unset ytics 9 | # 10 | set label 11 "001-040:" at graph 0.02, 0.9 11 | set label 12 "041-100:" at graph 0.02, 0.8 12 | set label 13 "101-140:" at graph 0.02, 0.7 13 | set label 14 "141-200:" at graph 0.02, 0.6 14 | set label 15 "201-240:" at graph 0.02, 0.5 15 | set label 16 "241-300:" at graph 0.02, 0.4 16 | set label 17 "301-340:" at graph 0.02, 0.3 17 | set label 18 "341-376:" at graph 0.02, 0.2 18 | # 19 | set label 1 at graph 0.2, 0.9 20 | set label 2 at graph 0.2, 0.8 21 | set label 3 at graph 0.2, 0.7 22 | set label 4 at graph 0.2, 0.6 23 | set label 5 at graph 0.2, 0.5 24 | set label 6 at graph 0.2, 0.4 25 | set label 7 at graph 0.2, 0.3 26 | set label 8 at graph 0.2, 0.2 27 | # 28 | set label 1 "\001\002\003\004\005\006\007\010\011 \013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040" 29 | set label 2 "\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100" 30 | set label 3 "\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140" 31 | set label 4 "\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200" 32 | set label 5 "\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240" 33 | set label 6 "\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300" 34 | set label 7 "\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340" 35 | set label 8 "\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376" 36 | # 37 | set xrange [-1:1] 38 | set yrange [-1:1] 39 | plot -10 notitle 40 | reset 41 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/circles.dem: -------------------------------------------------------------------------------- 1 | # 2 | # demo for the use of "set object circle" and "plot ... with circles" 3 | # 4 | # Ethan A Merritt, Ralf Juengling - 2007,2008 5 | 6 | set size ratio -1 7 | set style fill solid 1.0 border -1 8 | 9 | set obj 10 circle arc [ 0 : 20] fc rgb "red" 10 | set obj 11 circle arc [ 20 : 50] fc rgb "orange" 11 | set obj 12 circle arc [ 50 : 90] fc rgb "yellow" 12 | set obj 13 circle arc [ 90 : 120] fc rgb "forest-green" 13 | set obj 14 circle arc [120 : 190] fc rgb "dark-turquoise" 14 | set obj 15 circle arc [190 : 360] fc rgb "dark-magenta" 15 | 16 | set obj 10 circle at screen .18,.32 size screen .10 front 17 | set obj 11 circle at screen .18,.32 size screen .10 front 18 | set obj 12 circle at screen .18,.32 size screen .10 front 19 | set obj 13 circle at screen .1767,.342 size screen .10 front 20 | set obj 14 circle at screen .18,.32 size screen .10 front 21 | set obj 15 circle at screen .18,.32 size screen .10 front 22 | 23 | set obj 20 rect from graph 0,0 to graph 1,1 behind fc rgb "cyan" fs solid 0.2 24 | 25 | # plot world map and correspondent locations as a circle 26 | set title "" 27 | set xlabel "Note that overlapping transparent circles produce a darker area" 28 | unset key 29 | unset xtics 30 | unset ytics 31 | set border 32 | 33 | set yrange [-70:*] 34 | 35 | plot 'world.dat' with filledcurves lc rgb "light-green" , \ 36 | 'world.cor' using 1:2:(7.*rand(0)) with circles lt 3 \ 37 | fs transparent solid 0.5 noborder 38 | 39 | pause -1 "Hit return to continue" 40 | 41 | # by Peter Juhasz - 2010 42 | 43 | reset 44 | 45 | set style fill solid 1.0 border -1 46 | set size ratio -1 47 | 48 | # Plot pie charts on top of the map of the world. 49 | # The pie segments are read from a data file. 50 | # Each segment has to be specified with a start and end angle. 51 | 52 | set title "Sources of energy production, plotted for each continent" 53 | 54 | unset key 55 | unset xtics 56 | unset ytics 57 | set border 58 | 59 | set yrange [-70:*] 60 | set palette model HSV func gray*0.75, 0.5, 0.99 61 | unset colorbox 62 | r = 0.01 63 | types = 6 64 | keyx = -137. 65 | keyy = -15. 66 | keyr = 25. 67 | 68 | set obj 20 rect from graph 0,0 to graph 1,1 behind fc rgb "cyan" fs solid 0.2 69 | set angle degree 70 | 71 | plot 'world.dat' with filledcurves lc rgb "light-green" notit, \ 72 | 'energy_circles.dat' using 2:1:(sqrt($9)*r):6:($6+$7):5 \ 73 | with circles lc pal fs solid 1.0 border rgb "gray",\ 74 | for [i=0:types-1] '' using (keyx):(keyy):(keyr-5):(-(i+1)*360./types):(-(i)*360./types):5 \ 75 | every ::i::i with circles lc pal fs solid 1.0 border rgb "gray",\ 76 | for [i=0:types-1] '' using \ 77 | (keyx+keyr*cos(-(i+0.5)*360./types)):(keyy+keyr*sin(-(i+0.5)*360./types)):4 \ 78 | every ::i::i with labels 79 | 80 | 81 | 82 | pause -1 "Hit return to continue" 83 | 84 | 85 | # by Ralf Juengling - 2008 86 | 87 | reset 88 | set title "Trace of unconstrained optimization with trust-region method" 89 | unset key 90 | set size ratio -1 91 | set xrange [-2.5:1.5] 92 | set yrange [-1:2.5] 93 | plot 'optimize.dat' with circles lc rgb "blue" fs transparent solid 0.15 noborder,\ 94 | 'optimize.dat' u 1:2 with linespoints lw 2 lc rgb "black" 95 | 96 | pause -1 "Hit return to continue" 97 | 98 | 99 | reset 100 | set size ratio -1 101 | set title "Lena's key points" 102 | unset xtics 103 | unset ytics 104 | unset key 105 | unset border 106 | set yrange [] reverse 107 | 108 | plot 'lena.rgb' binary array=(128,128) dx=4 dy=4 format='%uchar' with rgbimage, \ 109 | 'lena-keypoints.bin' binary format='%double' with circles lc rgb "yellow" 110 | 111 | pause -1 "Hit return to continue" 112 | 113 | 114 | reset 115 | set size ratio -1 116 | set title "Delaunay triangulation of Hemisphere points, some empty circles in red" 117 | unset key 118 | 119 | plot 'empty-circles.dat' with circles lw 2 lc rgb "red", \ 120 | 'delaunay-edges.dat' with lines lc rgb "forest-green", \ 121 | 'hemisphr.dat' u (100*$1):(100*$2) with points pt 7 lc rgb "black" 122 | 123 | pause -1 "Hit return to continue" 124 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/cities.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrates how to derive variable font size from a data file column. 3 | # 4 | # If you are viewing this via the HTML canvas terminal, be sure to toggle 5 | # the font scaling icon so that the fonts change size as you zoom in. 6 | # 7 | Scale(size) = 0.25*sqrt(sqrt(column(size))) 8 | CityName(String,Size) = sprintf("{/=%d %s}", Scale(Size), stringcolumn(String)) 9 | 10 | set termoption enhanced 11 | save_encoding = GPVAL_ENCODING 12 | set encoding utf8 13 | unset xtics 14 | unset ytics 15 | unset key 16 | set border 0 17 | set size square 18 | set datafile separator "\t" 19 | plot 'cities.dat' using 5:4:($3 < 5000 ? "-" : CityName(1,3)) with labels 20 | pause -1 "hit return to continue" 21 | set encoding save_encoding 22 | reset 23 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/clipobject.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo and test for clipping applied to objects. 3 | # axis coordinates run from [-1:1] 4 | # graph coordinates from from [0:1] 5 | # screen coordinates from from [0.2:0.8] 6 | # 7 | reset 8 | 9 | set title "Default object clipping" 10 | set label 1 at graph 0.5, 0.9 center 11 | set label 1 "Outer = screen coords\nMiddle = graph coords\nInner = axis coords" 12 | 13 | set xrange[-1:1] 14 | set yrange[-1:1] 15 | set macros 16 | fs="fillstyle solid 1.0 border lc rgb 'black' lw 2" 17 | 18 | set lmargin at screen 0.2 19 | set rmargin at screen 0.8 20 | set tmargin at screen 0.8 21 | set bmargin at screen 0.2 22 | 23 | set object 1 rectangle from screen 0.1,screen 0.1 to screen 0.4, screen 0.4 24 | set object 1 fc rgb '#880000' @fs 25 | 26 | set object 11 rectangle from first -1.1,first -1.1 to first -0.9, first -0.9 27 | set object 11 fc rgb 'red' @fs 28 | set object 11 front 29 | 30 | set object 111 rectangle from graph -.1, -.1 to graph .1,.1 31 | set object 111 fc rgb '#DDAA00' @fs 32 | 33 | 34 | set object 2 circle at screen 0.2, screen 0.8 radius screen 0.1 35 | set object 2 fc rgb '#008800' @fs 36 | 37 | set object 22 circle at first -1, 1 radius first .15 38 | set object 22 fc rgb 'green' @fs 39 | set object 22 front 40 | 41 | set object 222 circle at graph 0, graph 1 radius graph 0.1 42 | set object 222 fc rgb '#00DDAA' @fs 43 | 44 | 45 | set object 3 polygon from screen 0.6,screen 0.6 rto 0.4,0 rto -0.2,0.4 46 | set object 3 fc rgb '#BBBB00' @fs 47 | 48 | set object 33 polygon from first 0.8,first 0.8 rto first 0.4,0 rto first -0.2, 0.4 49 | set object 33 fc rgb 'yellow' @fs 50 | set object 33 front 51 | 52 | set object 333 polygon from graph .8,graph .8 rto graph 0.4,0 rto graph -0.2, 0.4 53 | set object 333 fc rgb '#AAAA88' @fs 54 | 55 | set object 4 ellipse at screen 0.8, screen 0.2 size screen 0.3, 0.25 56 | set object 4 fc rgb '#4444bb' @fs 57 | 58 | set object 44 ellipse at first 1, -1 size first 0.4, first 0.25 59 | set object 44 fc rgb "cyan" @fs 60 | set object 44 front 61 | 62 | set object 444 ellipse at graph 1,graph 0 size first 0.8, first 0.5 63 | set object 444 fc rgb '#6666ff' @fs 64 | 65 | 66 | plot 0 67 | 68 | pause -1 "Hit return to continue" 69 | 70 | set title "Object property 'noclip'" 71 | 72 | do for [i=1:4]{ set object i noclip; set object i*11 noclip; set object i*111 noclip; } 73 | 74 | plot 0 75 | 76 | pause -1 "Hit return to continue" 77 | undefine fs 78 | reset 79 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/colorscheme.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo of color usage for principle plot elements 3 | # 4 | 5 | # Set canvas to a parchment color 6 | set obj 1 rectangle from screen 0,0 to screen 1,1 behind fc rgb "#e7dfcf" 7 | 8 | # Set plot area to light gray 9 | set obj 2 rectangle from graph 0,0 to graph 1,1 behind fc rgb "#dfdfdf" 10 | 11 | # border and tics in blue 12 | set border linetype 3 linewidth 3 13 | 14 | # key box and title in magenta, 15 | set key box lt 4 title "Key Box" 16 | 17 | # Apply the plot linetype color to the corresponding key entry title 18 | set key textcolor rgb variable 19 | set key left 20 | 21 | set title "Set new colors for principle plot elements" 22 | plot sin(x)/x lw 2, sin(x/2)/(x/2) lw 2 lt 4 23 | 24 | pause -1 "Hit return to continue" 25 | reset 26 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/colorwheel.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Set palette to HSV color wheel and define common colors as macros 3 | # This allows commands like 4 | # plot sin(x) with lines @orange 5 | # 6 | set palette mode HSV 7 | set palette defined ( 0 0 1 1, 1 1 1 1 ) 8 | set cbrange [0:1] 9 | red = "lt pal frac 0" 10 | orange = "lt pal frac 0.10" 11 | yellow = "lt pal frac 0.16" 12 | green = "lt pal frac 0.33" 13 | cyan = "lt pal frac 0.5" 14 | blue = "lt pal frac 0.66" 15 | violet = "lt pal frac 0.79" 16 | magenta = "lt pal frac 0.83" 17 | black = "lt -1" 18 | set macros 19 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/complex_trig.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Set up a color mapping for vectors in the complex plane similar to the one 3 | # used on Wikipedia for plotting complex trigonometric functions. 4 | # HSV colors 5 | # Hue is the vector angle atan( Real(f) / Imaginary(f) ) 6 | # Saturation is the vector magnitude (length) 7 | # V = 1 8 | # 9 | save_encoding = GPVAL_ENCODING 10 | set encoding utf8 11 | 12 | # We don't use the palette for plotting, but defining it allows us to 13 | # draw a colorbar showing the phase angle color scheme 14 | set palette model HSV defined ( 0 0 1 1, 1 1 1 1 ) 15 | set cbrange [-pi : pi] 16 | set cbtics ("0" -pi, "2π" pi) 17 | set cblabel "Phase Angle" rotate offset -2,0 18 | 19 | Hue(x,y) = (pi + atan2(-y,-x)) / (2*pi) 20 | phase(x,y) = hsv2rgb( Hue(x,y), sqrt(x**2+y**2), 1. ) 21 | 22 | set xrange [-pi/2. : pi/2.] 23 | set yrange [-pi/2. : pi/2.] 24 | set xtics ("-π/2" -pi/2., "-π/4" -pi/4., "0" 0, "π/4" pi/4., "π/2" pi/2.) 25 | set ytics ("-π/2" -pi/2., "-π/4" -pi/4., "0" 0, "π/4" pi/4., "π/2" pi/2.) 26 | 27 | set view map; set size square; unset key 28 | set isosamples 100,100 29 | 30 | set title "Color (Hue) indicates angle\nSaturation indicates amplitude" 31 | splot '++' using 1:2:(phase($1,$2)) with pm3d lc rgb variable 32 | 33 | pause -1 34 | 35 | rp(x,y) = real(f(x,y)) 36 | ip(x,y) = imag(f(x,y)) 37 | color(x,y) = hsv2rgb( Hue( rp(x,y), ip(x,y) ), abs(f(x,y)), 1. ) 38 | 39 | set title "asin( x + iy )" 40 | f(x,y) = asin(x + y*{0,1}) 41 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 42 | pause -1 43 | 44 | set title "acos( x + iy )" 45 | f(x,y) = acos(x + y*{0,1}) 46 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 47 | pause -1 48 | 49 | set title "atan( x + iy )" 50 | f(x,y) = atan(x + y*{0,1}) 51 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 52 | pause -1 53 | 54 | set title "sinh( x + iy )" 55 | f(x,y) = sinh(x + y*{0,1}) 56 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 57 | pause -1 58 | 59 | set title "cosh( x + iy )" 60 | f(x,y) = cosh(x + y*{0,1}) 61 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 62 | pause -1 63 | 64 | set title "tanh( x + iy )" 65 | f(x,y) = tanh(x + y*{0,1}) 66 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 67 | pause -1 68 | 69 | set title "asinh( x + iy )" 70 | f(x,y) = asinh(x + y*{0,1}) 71 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 72 | pause -1 73 | 74 | set title "acosh( x + iy )" 75 | f(x,y) = acosh(x + y*{0,1}) 76 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 77 | pause -1 78 | 79 | set title "atanh( x + iy )" 80 | f(x,y) = atanh(x + y*{0,1}) 81 | splot '++' using 1:2:(color($1,$2)) with pm3d lc rgb variable 82 | pause -1 83 | 84 | # 85 | # The final plot is atanh() again, but this time we represent 86 | # the magnitude as a z-coordinate. The angle in the complex 87 | # plane is colored as before. 88 | # 89 | 90 | set view 66, 336, 1.2, 1.2 91 | set view equal xyz 92 | set colorbox user origin 0.85, 0.2 93 | unset ztics 94 | set zlabel "magnitude" rotate offset 3 95 | set xlabel "Real" rotate parallel offset 0,-2 96 | set ylabel "Imaginary" rotate parallel offset 0,-2 97 | set grid x y 98 | set xyplane at 0.0 99 | set border -1 100 | 101 | splot '++' using 1:2:(abs(f($1,$2))):(color($1,$2)) with pm3d lc rgb variable 102 | 103 | pause -1 104 | 105 | # 106 | set encoding save_encoding 107 | reset 108 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/controls.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: controls.dem,v 1.3 1999/10/17 19:16:58 lhecking Exp $ 3 | # 4 | # warning: this demo is SLOW on PCs without math coprocessors! 5 | # 6 | # From _Automatic_Control_Systems_, fourth ed., figure 6-14 7 | # transient response of a second-order system to a unit step input function 8 | # 9 | damp(t) = exp(-s*wn*t)/sqrt(1.0-s*s) 10 | per(t) = sin(wn*sqrt(1.0-s**2)*t - atan(-sqrt(1.0-s**2)/s)) 11 | c(t) = 1-damp(t)*per(t) 12 | # 13 | # wn is natural undamped frequency 14 | # s is damping factor 15 | # 16 | wn = 1.0 17 | set xrange [0:13] 18 | set samples 50 19 | set dummy t 20 | set key box 21 | # 22 | # plot c(t) for several different damping factors s 23 | # 24 | plot s=.1,c(t),s=.3,c(t),s=.5,c(t),s=.7,c(t),s=.9,c(t),s=1.0,c(t),s=1.5,c(t),s=2.0,c(t) 25 | pause -1 "Hit return to continue" 26 | reset 27 | 28 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/dashcolor.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate explicit choice of both dot/dash pattern (linetype) and color (linecolor). 3 | # 4 | set termoption dash 5 | save_encoding = GPVAL_ENCODING 6 | set encoding utf8 7 | 8 | reset 9 | set xrange [-0.5:3.5] 10 | set yrange [-1:1.4] 11 | set bmargin 7 12 | unset ytics 13 | unset xtics 14 | # 15 | set title "Independent colors and dot/dash styles" 16 | unset colorbox 17 | # 18 | # reset linetypes to base dash patterns 19 | # 20 | set for [i=1:5] linetype i dt i 21 | 22 | # 23 | # define line styles using explicit rgbcolor names 24 | # 25 | set style line 1 lt 2 lc rgb "red" lw 3 26 | set style line 2 lt 2 lc rgb "orange" lw 2 27 | set style line 3 lt 2 lc rgb "yellow" lw 3 28 | set style line 4 lt 2 lc rgb "green" lw 2 29 | 30 | # 31 | set label 1 'set style line 1 lt 2 lc rgb "red" lw 3' at -0.4, -0.25 tc rgb "red" 32 | set label 2 'set style line 2 lt 2 lc rgb "orange" lw 2' at -0.4, -0.35 tc rgb "orange" 33 | set label 3 'set style line 3 lt 2 lc rgb "yellow" lw 3' at -0.4, -0.45 tc rgb "yellow" 34 | set label 4 'set style line 4 lt 2 lc rgb "green" lw 2' at -0.4, -0.55 tc rgb "green" 35 | set label 5 'plot ... lt 1 lc 3 ' at -0.4, -0.65 tc lt 3 36 | set label 6 'plot ... lt 3 lc 3 ' at -0.4, -0.75 tc lt 3 37 | set label 7 'plot ... lt 5 lc 3 ' at -0.4, -0.85 tc lt 3 38 | # 39 | set xlabel "You will only see dashed lines if your current terminal supports it" 40 | # 41 | show style line 42 | # 43 | # draw some plots 44 | # 45 | plot cos(x) ls 1 title 'ls 1', \ 46 | cos(x-.2) ls 2 title 'ls 2',\ 47 | cos(x-.4) ls 3 title 'ls 3',\ 48 | cos(x-.6) ls 4 title 'ls 4', \ 49 | cos(x-.8) lt 1 lc 3 title 'lt 1 lc 3', \ 50 | cos(x-1.) lt 3 lc 3 title 'lt 3 lc 3', \ 51 | cos(x-1.2) lt 5 lc 3 title 'lt 5 lc 3' 52 | 53 | # 54 | pause -1 "Hit return to continue" 55 | 56 | unset for [i=1:8] label i 57 | set title "The pointinterval property is another way to create interrupted lines" 58 | set xlabel "This technique works best for equally spaced data points" 59 | set bmargin 6 60 | set offset .05, .05 61 | set xrange [-0.5:3.3] 62 | set style func linespoints 63 | 64 | plot cos(x) lt -1 pi -4 pt 6 title 'pi -4', \ 65 | cos(x-.8) lt -1 pi -3 pt 7 ps 0.2 title 'pi -3 pt 7 ps 0.2', \ 66 | cos(x-.2) lt -1 pi -6 pt 7 title 'pi -6',\ 67 | cos(x-.4) lt -1 pi -3 pt 4 title 'pi -3',\ 68 | cos(x-.6) lt -1 pi -5 pt 5 title 'pi -5', \ 69 | cos(x-1.) with line lt -1 notitle, \ 70 | cos(x+.2) with line lt -1 lw 2 title 'lw 2' 71 | 72 | # 73 | pause -1 "Hit return to continue" 74 | 75 | set title "The pointinterval property also works with character point symbols" 76 | set style data linespoints 77 | set pointintervalbox 1.5 78 | unset xlabel 79 | 80 | plot '+' using 1:(cos(x-1.)) with line lt -1 lw 1 title 'lw 1', \ 81 | '+' using 1:(cos(x)) lt -1 pi -4 pt "C" title 'pi -4', \ 82 | '+' using 1:(cos(x-.8)) lt -1 pi -3 pt "D" ps 0.2 title 'pi -3 pt "D" ps 0.2', \ 83 | '+' using 1:(cos(x-.2)) lt -1 pi -6 pt "✩" title 'pi -6',\ 84 | '+' using 1:(cos(x-.4)) lt -1 pi -3 pt "✲" title 'pi -3',\ 85 | '+' using 1:(cos(x-.6)) lt -1 pi -5 pt "☺" title 'pi -5', \ 86 | '+' using 1:(cos(x+.2)) with line lt -1 lw 2 title 'lw 2' 87 | 88 | pause -1 "Hit return to continue" 89 | 90 | set encoding save_encoding 91 | reset 92 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/dashtypes.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Exercise various dashtype options 3 | # (Version 5 only) 4 | # 5 | set border 0 6 | unset xtics 7 | unset ytics 8 | unset key 9 | set yrange [0:1] 10 | 11 | y = 0.9 12 | set label 101 at screen 0.1, screen y "Terminal's native dashtypes" 13 | do for [i=1:10] { 14 | y = y - 0.05 15 | set arrow i from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 2 dt i 16 | set label i "dt ".i at screen 0.15, screen y 17 | } 18 | y = y - 0.05 19 | set label 102 at screen 0.1, screen y "Custom dashtypes" 20 | y = y - 0.05 21 | new = "." 22 | set label at screen 0.15, screen y 'dt "'.new.'"' 23 | set arrow 11 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new 24 | y = y - 0.05 25 | new = "-" 26 | set label at screen 0.15, screen y 'dt "'.new.'"' 27 | set arrow 12 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new 28 | y = y - 0.05 29 | new = "._" 30 | set label at screen 0.15, screen y 'dt "'.new.'"' noenh 31 | set arrow 13 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new 32 | y = y - 0.05 33 | new = "..- " 34 | set label at screen 0.15, screen y 'dt "'.new.'"' 35 | set arrow 14 from screen 0.25, screen y to screen 0.8, screen y nohead lw 1.5 lt 3 dt new 36 | 37 | plot 0 with lines lt nodraw 38 | 39 | pause -1 "Hit return to continue" 40 | 41 | # Now test effect of linewidth 42 | 43 | set for [i=1:14] arrow i lw 1+(i-1)%5 44 | 45 | plot 0 with lines lt nodraw 46 | 47 | pause -1 "Hit return to continue" 48 | 49 | reset 50 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/datastrings.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate features of datastrings patch 3 | # Ethan A Merritt 4 | # 08-Mar-2003 5 | # 6 | reset 7 | # 8 | # Illustrate reading plot labels from column head in datafile 9 | # 10 | set title "Auto-labeling plots from text fields in datafile" 11 | set label 1 "Generate plot labels from first row in each column" 12 | set label 1 at graph 0.02, 0.85 tc lt 3 13 | set label 2 "Generate x-axis labels from first column in each row" 14 | set label 2 at graph 0.02, 0.80 tc lt 3 15 | set style data linespoints 16 | set ylabel "mm" 17 | set yrange [0:200] 18 | # 19 | set key autotitle columnhead 20 | plot 'ctg-y2.dat' using 2:xticlabel(1) index 2, \ 21 | '' using 2 index 3 22 | # 23 | pause -1 " to plot again using x2ticlabels" 24 | # 25 | # Illustrate reading xtic axis labels from the datafile 26 | # 27 | reset 28 | set title "Read tic labels from a datafile column\nAn approximation of Hans Olav Eggestad's categoric plot patch\nusing 'using ($0):2:xticlabels(1)' and 'set style fill solid border -1'" 29 | set boxwidth 0.3 30 | set style fill solid 1.000000 border -1 31 | set bmargin 3 32 | set pointsize 2 33 | set yrange [0:180] 34 | set xrange [-0.5:11.5] 35 | set ylabel "mm" 36 | set tics scale 0.0 37 | set grid y 38 | set xtics 39 | # 40 | set key autotitle columnhead 41 | plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ 42 | '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ 43 | '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ 44 | '' using ($0):2:xticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" 45 | # 46 | pause -1 " to plot again using x2ticlabels" 47 | # 48 | set title "Same plot using x2ticlabels also" 49 | set x2tics 50 | plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ 51 | '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ 52 | '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ 53 | '' using ($0):2:x2ticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" 54 | # 55 | pause -1 " to plot same data from table format" 56 | set title "Plot from table format (titles taken from column headers)" 57 | unset x2tics 58 | plot 'table.dat' using ($0-0.2):2 title column(2) with boxes, \ 59 | '' using ($0+0.2):3 title column(3) with boxes, \ 60 | '' using ($0):4 title column(4) with linespoints, \ 61 | '' using ($0):5:xtic(1) title column(5) with linespoints 62 | # 63 | pause -1 " to show double use of y values" 64 | # 65 | set title "Plot actual y-value as a label" 66 | plot 'table.dat' using 0:2:xtic(1) title columnhead with boxes, \ 67 | '' using 0:2:2 with labels center offset 0,1 notitle 68 | pause -1 " to show use of boxed labels" 69 | # 70 | # 71 | # Not all terminals support boxed labels 72 | set key box opaque 73 | set yrange [20:120] 74 | set grid x 75 | set style textbox opaque 76 | set title "Plot using boxed labels" 77 | plot 'table.dat' using 0:2:xtic(1) title col with lines lw 3, \ 78 | '' using 0:2:2 with labels center boxed notitle 79 | 80 | # 81 | pause -1 " to end demo" 82 | reset 83 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/density.fnc: -------------------------------------------------------------------------------- 1 | # 2 | # This is a rough approach to fit a model function to the density 3 | # data of a liquid crystal. The function consists of a linear 4 | # branch for the high temperature region and of a curved branch with 5 | # linear asymptote for the low temperatuer branch 6 | # 7 | 8 | # free parameters: 9 | # m1, m2 slopes of the linear function in the low and high T region 10 | # Tc transition temperature 11 | # dens_Tc density at the transition temperature 12 | # g factor to scale tanh function 13 | 14 | ml = -0.0001 15 | mh = -0.0001 16 | dens_Tc = 1.020 17 | Tc = 45 18 | g = 1 19 | b = 0.1 20 | 21 | 22 | high(x) = mh*(x-Tc) + dens_Tc 23 | lowlin(x) = ml*(x-Tc) + dens_Tc 24 | curve(x) = b*tanh(g*(Tc-x)) 25 | 26 | density(x) = x < Tc ? curve(x)+lowlin(x) : high(x) 27 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/dgrid3d.dem: -------------------------------------------------------------------------------- 1 | set view 60,75 2 | unset key 3 | set hidden3d 4 | 5 | # Raw data 6 | set title "The Valley of the Gnu" 7 | splot "gnu-valley" u 1:2:3 w linesp 8 | pause -1 "Hit return to continue" 9 | 10 | # Splines 11 | set title "dgrid3d splines" 12 | set dgrid3d splines 13 | splot "gnu-valley" u 1:2:3 w lines 14 | pause -1 "Hit return to continue" 15 | 16 | # QNorm 17 | set title "dgrid3d 30,30 qnorm 1" 18 | set dgrid3d 30,30 qnorm 1 19 | splot "gnu-valley" u 1:2:3 w l 20 | pause -1 "Hit return to continue" 21 | 22 | set title "dgrid3d 30,30 qnorm 2" 23 | set dgrid3d 30,30 qnorm 2 24 | splot "gnu-valley" u 1:2:3 w l 25 | pause -1 "Hit return to continue" 26 | 27 | set title "dgrid3d 30,30 qnorm 3" 28 | set dgrid3d 30,30 qnorm 3 29 | splot "gnu-valley" u 1:2:3 w l 30 | pause -1 "Hit return to continue" 31 | 32 | set title "dgrid3d 30,30 qnorm 4" 33 | set dgrid3d 30,30 qnorm 4 34 | splot "gnu-valley" u 1:2:3 w l 35 | pause -1 "Hit return to continue" 36 | 37 | set title "dgrid3d 30,30 qnorm 5" 38 | set dgrid3d 30,30 qnorm 5 39 | splot "gnu-valley" u 1:2:3 w l 40 | pause -1 "Hit return to continue" 41 | 42 | 43 | # Gauss 44 | set title "dgrid3d 30,30 gauss 1" 45 | set dgrid3d 30,30 gauss 1 46 | splot "gnu-valley" u 1:2:3 w l 47 | pause -1 "Hit return to continue" 48 | 49 | set title "dgrid3d 30,30 gauss .75" 50 | set dgrid3d 30,30 gauss .75 51 | splot "gnu-valley" u 1:2:3 w l 52 | pause -1 "Hit return to continue" 53 | 54 | set title "dgrid3d 30,30 gauss .5" 55 | set dgrid3d 30,30 gauss .5 56 | splot "gnu-valley" u 1:2:3 w l 57 | pause -1 "Hit return to continue" 58 | 59 | set title "dgrid3d 30,30 gauss .35" 60 | set dgrid3d 30,30 gauss .35 61 | splot "gnu-valley" u 1:2:3 w l 62 | pause -1 "Hit return to continue" 63 | 64 | set title "dgrid3d 30,30 gauss .25" 65 | set dgrid3d 30,30 gauss .25 66 | splot "gnu-valley" u 1:2:3 w l 67 | pause -1 "Hit return to continue" 68 | 69 | set title "dgrid3d 30,30 gauss .5,.35" 70 | set dgrid3d 30,30 gauss 0.5,0.35 71 | splot "gnu-valley" u 1:2:3 w l 72 | pause -1 "Hit return to continue" 73 | 74 | set title "dgrid3d 30,30 gauss .35,.5" 75 | set dgrid3d 30,30 gauss 0.35,0.5 76 | splot "gnu-valley" u 1:2:3 w l 77 | pause -1 "Hit return to continue" 78 | 79 | reset 80 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/discrete.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: discrete.dem,v 1.4 2003/10/28 05:35:54 sfeam Exp $ 3 | # 4 | # 5 | set contour 6 | set title "Demo of specifying discrete contour levels - default contours" 7 | splot x*y 8 | pause -1 "Hit return to continue" 9 | 10 | #set discrete levels 11 | set cntrparam levels discrete 0, 15, 75 12 | set title "3 discrete contours at 0 15 & 75" 13 | replot 14 | pause -1 "Hit return to continue" 15 | 16 | #set incremental levels 17 | set cntrp level incr -20, 5, 9 18 | set title "9 incremental contours starting at -20, stepping by 5" 19 | replot 20 | pause -1 "Hit return to continue" 21 | 22 | #restore defaults 23 | set title "" 24 | unset contour 25 | set cntrparam levels auto 5 26 | 27 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/electron.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: electron.dem,v 1.10 2010/01/01 02:06:35 sfeam Exp $ 3 | # 4 | # Electronics demo 5 | # 6 | # Bipolar Transistor (NPN) Mutual Characteristic 7 | Ie(Vbe)=Ies*exp(Vbe/kT_q) 8 | Ic(Vbe)=alpha*Ie(Vbe)+Ico 9 | alpha = 0.99 10 | Ies = 4e-14 11 | Ico = 1e-09 12 | kT_q = 0.025 13 | set dummy Vbe 14 | set grid 15 | set offsets 16 | unset log 17 | unset polar 18 | set samples 160 19 | set title "Mutual Characteristic of a Transistor" 20 | set xlabel "Vbe (base emmitter voltage)" 21 | set xrange [0 : 0.75] 22 | set ylabel "Ic (collector current)" 23 | set yrange [0 : 0.005] 24 | set key box 25 | set key at .2,.0045 26 | set format y "%.4f" 27 | plot Ic(Vbe) 28 | set format "%g" 29 | 30 | pause -1 "Hit return to continue" 31 | 32 | # Junction Field Effect Transistor (JFET) Mutual Characteristic 33 | # drain current above pinch off 34 | Ida(Vd)=Ido*(1-Vg/Vp)**2 35 | # drain current below pinch off 36 | Idb(Vd)=Ido*(2*Vd*(Vg-Vp)-Vd*Vd)/(Vp*Vp) 37 | # drain current 38 | Id(Vd)= (Vd>Vg-Vp) ? Ida(Vd) : Idb(Vd) 39 | # drain current at zero gate voltage 40 | Ido = 2.5 41 | # pinch off voltage 42 | Vp = -1.25 43 | # gate voltage 44 | Vg = 0 45 | set dummy Vd 46 | unset grid 47 | unset key 48 | #set offsets 0, 1, 0, 0 49 | set title "JFET Mutual Characteristic" 50 | set xlabel "Drain voltage Vd (V)" 51 | set xrange [0 : 4] 52 | set ylabel "Drain current Id (mA)" 53 | set yrange [0 : 5] 54 | set rmargin 12 55 | set label 1 "-0.5 Vp" at 4.1,0.625 56 | set label 2 "-0.25 Vp" at 4.1,1.4 57 | set label 3 "0" at 4.1,2.5 58 | set label 4 "Vg = 0.5 Vp" at 4.1,3.9 59 | plot Vg=0.5*Vp,Id(Vd),Vg=0.25*Vp,Id(Vd),Vg=0,Id(Vd),Vg=-0.25*Vp,Id(Vd) 60 | 61 | pause -1 "Hit return to continue" 62 | unset label 63 | unset rmargin 64 | 65 | # show off double axes 66 | 67 | # amplitude frequency response 68 | A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) 69 | p1 = 10 70 | p2 = 10000 71 | set dummy jw 72 | set grid x y2 73 | set logscale xy 74 | set log x2 75 | unset log y2 76 | set key default 77 | set key bottom center box 78 | set title "Amplitude and Phase Frequency Response" 79 | set xlabel "jw (radians)" 80 | set xrange [1.1 : 90000.0] 81 | set ylabel "magnitude of A(jw)" 82 | set y2label "Phase of A(jw) (degrees)" 83 | set ytics nomirror tc lt 1 84 | set y2tics nomirror tc lt 3 85 | set xtics mirror 86 | set tics out 87 | set autoscale y 88 | set autoscale y2 89 | plot abs(A(jw)) lt 1, 180/pi*arg(A(jw)) axes x1y2 lt 3 90 | 91 | pause -1 "Hit return to continue" 92 | 93 | # undo what we've done 94 | reset 95 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/ellipse.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Ethan A Merritt - Feb 2007 3 | # This demo requires support for 'set object ellipse' 4 | # 5 | load "gen-random.inc" 6 | 7 | unset key 8 | set xrange [-8:8] 9 | set yrange [-8:8] 10 | set size ratio 1.0 11 | set zeroaxis 12 | set border 0 13 | set xtics axis 14 | set ytics axis 15 | set tics scale 0.5 16 | set format xy "" 17 | 18 | set title 'Example of `set object ellipse`' 19 | 20 | set object 1 ellipse center 1.5,1.0 size 2.,4. angle 20. front fillstyle empty border -1 21 | set obj 2 ellipse center 1.5, 1 size 6, 12 angle 20 front fs empty bo 3 22 | 23 | A = pi/9. 24 | plot $random using (1.5 + $1*cos(A)-2.*$2*sin(A)):(1.0 + $1*sin(A)+2.*$2*cos(A)) with dots 25 | 26 | pause -1 "Hit return to continue" 27 | 28 | set title 'Example of range-limited axes and tics' 29 | 30 | set tics out scale 0.5 31 | set xtics 1.0 border rangelimited nomirror 32 | set ytics 1.0 border rangelimited nomirror 33 | set format xy "%.0f" 34 | set border 3 35 | 36 | replot 37 | 38 | pause -1 "Hit return to continue" 39 | 40 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/ellipses_style.dem: -------------------------------------------------------------------------------- 1 | # Demo to illustrate the ellipses style 2 | 3 | set title "Demonstration of the 'ellipses' plotting style\nTwo-column form: x y (default size)" 4 | 5 | plot 'ellipses.dat' u 1:2 with ellipses 6 | 7 | pause -1 'Hit to continue' 8 | 9 | set title "Three-column form: x y major_diameter (minor diameter is the same)" noenh 10 | 11 | plot 'ellipses.dat' u 1:2:3 with ellipses 12 | 13 | pause -1 'Hit to continue' 14 | 15 | set title "Four-column form: x y major_diameter minor_diameter" noenh 16 | 17 | plot 'ellipses.dat' u 1:2:3:4 with ellipses 18 | 19 | pause -1 'Hit to continue' 20 | 21 | set title "Five-column form: x y major_diameter minor_diameter angle" noenh 22 | 23 | plot 'ellipses.dat' u 1:2:3:4:5 with ellipses 24 | 25 | pause -1 'Hit to continue' 26 | 27 | set title "Six-column form: 6th column variable color (lc variable)" 28 | 29 | plot 'ellipses.dat' u 1:2:3:4:5:6 with ellipses lc var 30 | 31 | pause -1 'Hit to continue' 32 | 33 | set title "Six-column form: 6th column variable color (lc palette)" 34 | 35 | plot 'ellipses.dat' u 1:2:3:4:5:6 with ellipses lc pal 36 | 37 | pause -1 'Hit to continue' 38 | 39 | set title "Six-column form: 6th column variable color (lc rgb variable)" 40 | 41 | plot 'ellipses.dat' u 1:2:3:4:5:7 with ellipses lc rgb var 42 | 43 | pause -1 'Hit to continue' 44 | 45 | set title "Scaling of axes: units xy" 46 | set yr [-15:30] 47 | set xr [-5:15] 48 | 49 | plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units xy 50 | 51 | pause -1 'Hit to continue' 52 | 53 | set title "Scaling of axes: units xx" 54 | 55 | plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units xx 56 | 57 | pause -1 'Hit to continue' 58 | 59 | set title "Scaling of axes: units yy" 60 | 61 | plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units yy 62 | 63 | pause -1 'Hit to continue' 64 | 65 | set title "Now see all three together" 66 | 67 | plot 'ellipses.dat' u 1:2:3:4:5 with ellipses units xy title "units xy",\ 68 | '' u 1:2:3:4:5 with ellipses units xx title "units xx",\ 69 | '' u 1:2:3:4:5 with ellipses units yy title "units yy" 70 | 71 | pause -1 'Hit to continue' 72 | 73 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/enhanced_utf8.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Test page for enhanced text mode in UTF-8 encoding 3 | # 4 | # Suggested PostScript font test 5 | # set term post color fontfile /usr/local/fonts/'l_10646.ttf' font "LucidaSansUnicode,12" 6 | # set output 'enhanced_utf8.ps' 7 | # 8 | set termoption enhanced 9 | save_encoding = GPVAL_ENCODING 10 | set encoding utf8 11 | # 12 | set title "Demo of enhanced text mode using a single UTF-8 encoded font\nThere is another demo that shows how to use a separate Symbol font" 13 | set xrange [-1:1] 14 | set yrange [-0.5:1.1] 15 | set format xy "%.1f" 16 | set arrow from 0.5, -0.5 to 0.5, 0.0 nohead 17 | # 18 | set label 1 at -0.65, 0.95 19 | set label 1 "Superscripts and subscripts:" tc lt 3 20 | 21 | set label 3 at -0.55, 0.85 22 | set label 3 'A_{j,k} 10^{-2} x@^2_k x@_0^{-3/2}y' 23 | 24 | set label 5 at -0.55, 0.7 25 | set label 5 "Space-holders:" tc lt 3 26 | set label 6 at -0.45, 0.6 27 | set label 6 "<&{{/=20 B}ig}> <&{x@_0^{-3/2}y}> holds space for" 28 | set label 7 at -0.45, 0.5 29 | set label 7 "<{{/=20 B}ig}> <{x@_0^{-3/2}y}>" 30 | 31 | set label 8 at -0.9, -0.2 32 | set label 8 "Overprint\n(v should be centred over d)" tc lt 3 33 | set label 9 at -0.85, -0.4 34 | set label 9 " ~{abcdefg}{0.8v}" 35 | 36 | 37 | set label 10 at -.40, 0.35 38 | set label 10 "UTF-8 encoding does not require Symbol font:" tc lt 3 39 | set label 11 at -.30, 0.2 40 | set label 11 "{/*1.5 ∫@_{/=9.6 0}^{/=12 ∞}} {e^{-{μ}^2/2} d}{μ=(π/2)^{1/2}}" 41 | 42 | set label 21 at 0.5, -.1 43 | set label 21 "Left ^{centered} ƒ(αβγδεζ)" left 44 | set label 22 at 0.5, -.2 45 | set label 22 "Right ^{centered} ƒ(αβγδεζ)" right 46 | set label 23 at 0.5, -.3 47 | set label 23 "Center^{centered} ƒ(αβγδεζ)" center 48 | 49 | set label 30 at -.9, 0.0 "{/:Bold Bold} and {/:Italic Italic} markup" 50 | # 51 | set key title " " 52 | plot sin(x)**2 lt 2 lw 2 title "sin^2(x)" 53 | # 54 | pause -1 "Hit return to continue" 55 | set encoding save_encoding 56 | reset 57 | 58 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/enhancedtext.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Test page for enhanced text mode 3 | # 4 | print " ----------------------------------------------------" 5 | print " This test page for enhanced text mode will only work" 6 | print " if enhanced text is selected and supported for the" 7 | print " current terminal type. E.g. 'set term post enh'" 8 | print " ----------------------------------------------------" 9 | # 10 | set termoption enhanced 11 | save_encoding = GPVAL_ENCODING 12 | set encoding iso_8859_1 13 | # 14 | set title "Test page for enhanced text mode" 15 | set xrange [-1:1] 16 | set yrange [-0.5:1.1] 17 | set format xy "%.1f" 18 | set arrow from 0.5, -0.5 to 0.5, 0.0 nohead 19 | # 20 | set label 1 at -0.65, 1.0 21 | set label 1 "These examples require no extra fonts:" tc lt 3 22 | set label 2 at -0.55, 0.9 23 | set label 2 "10^{-2} A_{j,k} e^x" 24 | set label 3 at -0.55, 0.8 25 | set label 3 'x@^2_k x@_0^{-3/2}y' 26 | 27 | set label 5 at -0.55, 0.7 28 | set label 5 "Space-holders:" tc lt 3 29 | set label 6 at -0.45, 0.6 30 | set label 6 "<&{{/=20 B}ig}> <&{x@_0^{-3/2}y}> holds space for" 31 | set label 7 at -0.45, 0.5 32 | set label 7 "<{/=20 B}ig> " 33 | 34 | set label 8 at -0.9, -0.2 35 | set label 8 "Overprint\n(v should be centred over d)" tc lt 3 36 | set label 9 at -0.85, -0.4 37 | set label 9 " ~{abcdefg}{0.8v}" 38 | 39 | 40 | set label 10 at -.40, 0.35 41 | set label 10 "Requires Symbol font:" tc lt 3 42 | set label 11 at -.30, 0.2 43 | set label 11 "{/Symbol=18 \362@_{/=9.6 0}^{/=12 ^\245}} {e^{-{/Symbol m}^2/2} d}{/Symbol m=(p/2)^{1/2}}" 44 | 45 | set label 21 at 0.5, -.1 46 | set label 21 "Left ^{centered} text" left 47 | set label 22 at 0.5, -.2 48 | set label 22 "Right ^{centered} text" right 49 | set label 23 at 0.5, -.3 50 | set label 23 "Center^{centered} text" center 51 | # 52 | set key title " " 53 | plot sin(x)**2 lt 2 lw 2 title "sin^2(x)" 54 | # 55 | pause -1 "Hit to continue" 56 | set encoding save_encoding 57 | reset 58 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/epslatex.dem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cznic/plot/5080b08f15bb936fd11f95875a14242e1937dee7/testdata/gnuplot-5.0.3/demo/epslatex.dem -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/fillbetween.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate filling the area between two curves 3 | # and also the application of fillstyle to filled curves. 4 | # Ethan Merritt 5 | # June 2004 6 | # 7 | set title "Fill area between two curves" 8 | set style data lines 9 | set xrange [10:*] 10 | set yrange [0:175] 11 | plot 'silver.dat' u 1:2:3 "%lf %lf %lf" w filledcu, \ 12 | '' u 1:2 lt -1 notitle, '' u 1:3 lt -1 notitle 13 | pause -1 "Hit return to continue" 14 | set style fill pattern 2 15 | set title "Fill area between two curves (pattern fill)" 16 | replot 17 | pause -1 "Hit return to continue" 18 | set title "Fill area between two curves (above/below)" 19 | set style fill solid 1.0 noborder 20 | set xrange [250:500] 21 | set auto y 22 | plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ 23 | '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \ 24 | '' u 1:2 lt -1 lw 2 title 'curve 1', \ 25 | '' u 1:($3+$1/50.) lt 3 lw 2 title 'curve 2' 26 | pause -1 "Hit return to continue" 27 | reset 28 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/fillcrvs.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: fillcrvs.dem,v 1.6 2007/05/19 20:35:53 sfeam Exp $ 3 | # 4 | ### Demo for 'with filledcurves' 5 | 6 | reset 7 | 8 | set title 9 | set key outside 10 | set title "plot with filledcurve [options]" 11 | plot [-10:10] [-5:3] \ 12 | 1.5+sin(x)/x with filledcurve x2, \ 13 | sin(x)/x with filledcurve, \ 14 | 1+sin(x)/x with lines, \ 15 | -1+sin(x)/x with filledcurve y1=-2, \ 16 | -2.5+sin(x)/x with filledcurve xy=-5,-4., \ 17 | -4.3+sin(x)/x with filledcurve x1, \ 18 | (x>3.5 ? x/3-3 : 1/0) with filledcurve y2 19 | pause -1 'Press Return to continue' 20 | 21 | set key on 22 | set title "Intersection of two parabolas" 23 | plot x*x with filledcurves, 50-x*x with filledcurves, x*x with line lt 1 24 | pause -1 'Press Return to continue' 25 | 26 | set grid front 27 | set title "Filled sinus and cosinus curves" 28 | plot 2+sin(x)**2 with filledcurve x1, cos(x)**2 with filledcurve x1 29 | pause -1 'Press Return to continue' 30 | 31 | set title "The red bat: abs(x) with filledcurve xy=2,5" 32 | plot abs(x) with filledcurve xy=2,5 33 | pause -1 'Press Return to continue' 34 | 35 | set title "Some sqrt stripes on filled graph background" 36 | plot [0:10] [-8:6] \ 37 | -8 with filledcurve x2 lt 15, \ 38 | sqrt(x) with filledcurves y1=-0.5, \ 39 | sqrt(10-x)-4.5 with filledcurves y1=-5.5 40 | pause -1 'Press Return to continue' 41 | 42 | reset 43 | set title "Let's smile with parametric filled curves" 44 | set size square 45 | set key off 46 | unset border 47 | unset xtics 48 | unset ytics 49 | set grid 50 | set arrow 1 from -0.1,0.26 to 0.18,-0.17 front size 0.1,40 lt 5 lw 4 51 | set label 1 "gnuplot" at 0,1.2 center front 52 | set label 2 "gnuplot" at 0.02,-0.6 center front 53 | set parametric 54 | set xrange [-1:1] 55 | set yrange [-1:1.6] 56 | plot [t=-pi:pi] \ 57 | sin(t),cos(t) with filledcurve xy=0,0 lt 15, \ 58 | sin(t)/8-0.5,cos(t)/8+0.4 with filledcurve lt 3, \ 59 | sin(t)/8+0.5,cos(t)/8+0.4 with filledcurve lt 3, \ 60 | t/5,abs(t/5)-0.8 with filledcurve xy=0.1,-0.5 lt 1, \ 61 | t/3,1.52-abs(t/pi) with filledcurve xy=0,1.8 lt -1 62 | pause -1 'Press Return to continue' 63 | 64 | reset 65 | 66 | set title "world.dat plotted with filledcurves" 67 | set format x "" 68 | set format y "" 69 | set grid layerdefault linewidth 0.5 70 | set object 1 rect from graph 0, 0 to graph 1, 1 behind fc rgb "#afffff" fillstyle solid 1.00 border -1 71 | set xrange [ -180.000 : 180.000 ] 72 | set yrange [ -70.0000 : 80.0000 ] 73 | set lmargin 1 74 | plot 'world.dat' with filledcurve notitle fs solid 1.0 lc rgb 'dark-goldenrod' 75 | pause -1 'Press Return to continue' 76 | 77 | reset 78 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/fillstyle.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: fillstyle.dem,v 1.3 2003/10/17 15:02:21 mikulik Exp $ 3 | # 4 | # E A Merritt 24-Sep-2002 5 | # 6 | # Demo for revised fillstyle code selected by 7 | # ./configure --enable-filledboxes --enable-relative-boxwidth 8 | # 9 | reset 10 | 11 | set samples 25 12 | unset xtics 13 | unset ytics 14 | set yrange [0:120] 15 | 16 | set title "A demonstration of boxes with default properties" 17 | plot [-10:10] 100/(1.0+x*x) title 'distribution' with boxes 18 | 19 | pause -1 "Now draw the boxes with solid fill" 20 | 21 | set title "A demonstration of boxes with style fill solid 1.0" 22 | set style fill solid 1.0 23 | replot 24 | 25 | pause -1 "Now draw the boxes with a black border" 26 | 27 | set title "A demonstration of boxes with style fill solid border -1" 28 | set style fill solid border -1 29 | replot 30 | 31 | pause -1 "Now make the boxes a little less wide" 32 | 33 | set title "Filled boxes of reduced width" 34 | set boxwidth 0.5 35 | replot 36 | 37 | pause -1 "And now let's try a different fill density" 38 | 39 | set title "Filled boxes at 50% fill density" 40 | set style fill solid 0.25 border 41 | replot 42 | 43 | pause -1 "Now draw the boxes with no border" 44 | 45 | set title "A demonstration of boxes with style fill solid 0.25 noborder" 46 | set style fill solid 0.25 noborder 47 | replot 48 | 49 | pause -1 "Or maybe a pattern fill, instead?" 50 | 51 | set title "A demonstration of boxes in mono with style fill pattern" 52 | set samples 11 53 | set boxwidth 0.5 54 | set style fill pattern border 55 | plot [-2.5:4.5] 100/(1.0+x*x) title 'pattern 0' with boxes lt -1, \ 56 | 80/(1.0+x*x) title 'pattern 1' with boxes lt -1, \ 57 | 40/(1.0+x*x) title 'pattern 2' with boxes lt -1, \ 58 | 20/(1.0+x*x) title 'pattern 3' with boxes lt -1 59 | 60 | pause -1 "Finished this demo" 61 | 62 | reset 63 | 64 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/fontfile.dem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cznic/plot/5080b08f15bb936fd11f95875a14242e1937dee7/testdata/gnuplot-5.0.3/demo/fontfile.dem -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/fontfile_latex.dem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cznic/plot/5080b08f15bb936fd11f95875a14242e1937dee7/testdata/gnuplot-5.0.3/demo/fontfile_latex.dem -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/gantt.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Very simple Gantt Chart 3 | # Demonstrate using timecolumn(N,format) to plot time data from 4 | # multiple columns 5 | # 6 | $DATA << EOD 7 | #Task start end 8 | A 2012-11-01 2012-12-31 9 | B 2013-01-01 2013-03-14 10 | C 2013-03-15 2014-04-30 11 | D 2013-05-01 2013-06-30 12 | E 2013-07-01 2013-08-31 13 | F1 2013-09-01 2013-10-31 14 | F2 2013-09-01 2014-01-17 15 | F3 2013-09-01 2014-01-30 16 | F4 2013-09-01 2014-03-31 17 | G1 2013-11-01 2013-11-27 18 | G2 2013-11-01 2014-01-17 19 | L 2013-11-28 2013-12-19 20 | M 2013-11-28 2014-01-17 21 | N 2013-12-04 2014-03-02 22 | O 2013-12-20 2014-01-17 23 | P 2013-12-20 2014-02-16 24 | Q 2014-01-05 2014-01-13 25 | R 2014-01-18 2014-01-30 26 | S 2014-01-31 2014-03-31 27 | T 2014-03-01 2014-04-28 28 | EOD 29 | 30 | set xdata time 31 | timeformat = "%Y-%m-%d" 32 | set format x "%b\n'%y" 33 | 34 | set yrange [-1:] 35 | OneMonth = strptime("%m","2") 36 | set xtics OneMonth nomirror 37 | set xtics scale 2, 0.5 38 | set mxtics 4 39 | set ytics nomirror 40 | set grid x y 41 | unset key 42 | set title "{/=15 Simple Gantt Chart}\n\n{/:Bold Task start and end times in columns 2 and 3}" 43 | set border 3 44 | 45 | T(N) = timecolumn(N,timeformat) 46 | 47 | set style arrow 1 filled size screen 0.02, 15 fixed lt 3 lw 1.5 48 | 49 | plot $DATA using (T(2)) : ($0) : (T(3)-T(2)) : (0.0) : yticlabel(1) with vector as 1, \ 50 | $DATA using (T(2)) : ($0) : 1 with labels right offset -2 51 | 52 | pause -1 "Hit return to check backwards compatibility with v4 syntax" 53 | 54 | set timefmt timeformat 55 | plot $DATA using (timecolumn(2)) : ($0) : (T(3)-T(2)) : (0.0) : yticlabel(1) with vector as 1, \ 56 | $DATA using 2 : ($0) : 1 with labels right offset -2 57 | 58 | pause -1 "Hit return to continue" 59 | reset 60 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/gen-random.inc: -------------------------------------------------------------------------------- 1 | # 2 | # create random data, used e.g. by 3 | # random.dem, ellipse.dem, rugplot.dem, and kdensity2d.dem 4 | # 5 | if (!exist("$random")) { 6 | load "stat.inc" 7 | nsamp = 3000 8 | # Generate N random data points. 9 | set print $random 10 | do for [i=1:nsamp] { 11 | print sprintf("%8.5g %8.5g %8.5g", invnorm(rand(0)), invnorm(rand(0)), invnorm(rand(0))) 12 | } 13 | unset print 14 | } 15 | 16 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/heatmaps.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Various ways to create a 2D heat map from ascii data 3 | # 4 | 5 | set title "Heat Map generated from a file containing Z values only" 6 | unset key 7 | set tic scale 0 8 | 9 | # Color runs from white to green 10 | set palette rgbformula -7,2,-7 11 | set cbrange [0:5] 12 | set cblabel "Score" 13 | unset cbtics 14 | 15 | set xrange [-0.5:4.5] 16 | set yrange [-0.5:4.5] 17 | 18 | $map1 << EOD 19 | 5 4 3 1 0 20 | 2 2 0 0 1 21 | 0 0 0 1 0 22 | 0 0 0 2 3 23 | 0 1 2 4 3 24 | EOD 25 | 26 | set view map 27 | splot '$map1' matrix with image 28 | 29 | pause -1 "Hit return to continue" 30 | 31 | set title "Heat Map generated by 'plot' from a stream of XYZ values"\ 32 | ."\nNB: Rows must be separated by blank lines!" 33 | 34 | $map2 << EOD 35 | 0 0 5 36 | 0 1 4 37 | 0 2 3 38 | 0 3 1 39 | 0 4 0 40 | 41 | 1 0 2 42 | 1 1 2 43 | 1 2 0 44 | 1 3 0 45 | 1 4 1 46 | 47 | 2 0 0 48 | 2 1 0 49 | 2 2 0 50 | 2 3 1 51 | 2 4 0 52 | 53 | 3 0 0 54 | 3 1 0 55 | 3 2 0 56 | 3 3 2 57 | 3 4 3 58 | 59 | 4 0 0 60 | 4 1 1 61 | 4 2 2 62 | 4 3 4 63 | 4 4 3 64 | EOD 65 | 66 | plot '$map2' using 2:1:3 with image 67 | 68 | pause -1 "Hit return to continue" 69 | 70 | set title "Heat map with non-zero pixel values written as labels" 71 | plot $map1 matrix using 1:2:3 with image, \ 72 | $map1 matrix using 1:2:($3 == 0 ? "" : sprintf("%g",$3) ) with labels 73 | 74 | pause -1 "Hit return to continue" 75 | 76 | set title "Heat map from csv data with column and row labels" 77 | 78 | $map3 << EOD 79 | ,Apple,Bacon,Cream,Donut,Eclair 80 | Row 1, 5, 4, 3, 1, 0 81 | Row 2, 2, 2, 0, 0, 1 82 | Row 3, 0, 0, 0, 1, 0 83 | Row 4, 0, 0, 0, 2, 3 84 | Row 5, 0, 1, 2, 4, 3 85 | EOD 86 | 87 | set datafile separator comma 88 | plot '$map3' matrix rowheaders columnheaders using 1:2:3 with image 89 | set datafile separator 90 | 91 | pause -1 92 | 93 | # Some output modes (SVG, HTML5) allow smoothing of adjacent pixels, 94 | # which may not be desired. This is not normally an issue with PNG or PDF. 95 | # The `pixels` option forces pixel-by-pixel drawing with no smoothing. 96 | 97 | unset colorbox 98 | set format xy "" 99 | set multiplot layout 1,2 title "Compare 'image' and 'image pixels' modes" \ 100 | margin screen 0.05, 0.95, 0.10, 0.85 spacing screen 0.05 101 | set title "plot with image" 102 | plot $map1 matrix using 1:2:3 with image 103 | set title "plot with image pixels" 104 | plot $map1 matrix using 1:2:3 with image pixels 105 | unset multiplot 106 | 107 | pause -1 "Hit return to continue" 108 | 109 | reset 110 | 111 | # 112 | # Demonstrate use of 4th data column to color a 3D surface. 113 | # Also demonstrate use of the pseudodata special file '++'. 114 | # This plot is nice for exploring the effect of the 'l' and 'L' hotkeys. 115 | # 116 | set view 49, 28, 1, 1.48 117 | set xrange [ 5 : 35 ] noreverse nowriteback 118 | set yrange [ 5 : 35 ] noreverse nowriteback 119 | # set zrange [ 1.0 : 3.0 ] noreverse nowriteback 120 | set ticslevel 0 121 | set format cb "%4.1f" 122 | set colorbox user size .03, .6 noborder 123 | set cbtics scale 0 124 | 125 | set samples 25, 25 126 | set isosamples 50, 50 127 | 128 | set title "4D data (3D Heat Map)"\ 129 | ."\nIndependent value color-mapped onto 3D surface" offset 0,1 130 | set xlabel "x" offset 3, 0, 0 131 | set ylabel "y" offset -5, 0, 0 132 | set zlabel "z" offset 2, 0, 0 133 | set pm3d implicit at s 134 | 135 | Z(x,y) = 100. * (sinc(x,y) + 1.5) 136 | sinc(x,y) = sin(sqrt((x-20.)**2+(y-20.)**2))/sqrt((x-20.)**2+(y-20.)**2) 137 | color(x,y) = 10. * (1.1 + sin((x-20.)/5.)*cos((y-20.)/10.)) 138 | 139 | splot '++' using 1:2:(Z($1,$2)):(color($1,$2)) with pm3d title "4 data columns x/y/z/color" 140 | 141 | pause -1 "Hit return to continue" 142 | 143 | set title "4D data (3D Heat Map)"\ 144 | ."\nZ is contoured. Independent value is color-mapped" offset 0,1 145 | 146 | set view map 147 | set ylabel norotate offset -1,0 148 | 149 | set contour base 150 | splot '++' using 1:2:(Z($1,$2)):(color($1,$2)) with pm3d title "4 data columns x/y/z/color" 151 | 152 | pause -1 "Hit return to continue" 153 | 154 | # Release datablocks used in this demo 155 | undefine $map1 $map2 $map3 156 | reset 157 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/hexa.fnc: -------------------------------------------------------------------------------- 1 | # 2 | # Use this function to fit sound velocity data as function of 3 | # sound propagation direction, indicated by its angle against the 4 | # z-axis of an hexagonal symmetry coordinate system 5 | # 6 | # Adjustable parameters: 7 | # 8 | # c33, c11, c13, c44 elastic moduli - materials constants 9 | # phi0 angle offset 10 | # 11 | # HBB 970522: factored out common factor 1e9 from c?? into the 12 | # function, to improve the fit convergence. Fit parameters were 13 | # just too grossly different before. 14 | 15 | rho = 1000.0 # density in kg/m3 16 | 17 | phi(x) = (x - phi0)/360.0*2.0*pi 18 | 19 | main(x) = c11*sin(phi(x))**2 + c33*cos(phi(x))**2 + c44 20 | mixed(x) = sqrt( ((c11-c44)*sin(phi(x))**2 \ 21 | +(c44-c33)*cos(phi(x))**2)**2 \ 22 | +(2.0*(c13+c44)*sin(phi(x))*cos(phi(x)))**2 ) 23 | 24 | vlong(x) = sqrt(1.0/2.0/rho*1e9*(main(x) + mixed(x))) 25 | vtrans(x) = sqrt(1.0/2.0/rho*1e9*(main(x) - mixed(x))) 26 | 27 | # When we read the file in, we set y=index, and we use 28 | # y in this (pseudo) 3d fit to choose an x function 29 | 30 | f(x,y) = y==1 ? vlong(x) : vtrans(x) 31 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/hidden.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: hidden.dem,v 1.7 2003/10/28 05:35:54 sfeam Exp $ 3 | # 4 | # 5 | set samples 20 6 | set isosamples 20 7 | set hidden3d 8 | set title "Hidden line removal of explicit surfaces" 9 | 10 | 11 | set xrange [-3:3] 12 | set yrange [-2:2] 13 | splot 1 / (x*x + y*y + 1) 14 | pause -1 "Hit return to continue (1)" 15 | 16 | set xrange [-1:1] 17 | set yrange [-1:1] 18 | splot x*y / (x**2 + y**2 + 0.1) 19 | pause -1 "Hit return to continue (2)" 20 | 21 | set view 70,45 22 | unset contour 23 | set xrange [-3:3] 24 | set yrange [-3:3] 25 | splot sin(x*x + y*y) / (x*x + y*y) 26 | pause -1 "Hit return to continue (3)" 27 | 28 | set view 60,30 29 | set xrange [-3:3] 30 | set yrange [-3:3] 31 | set zrange [-1:1] 32 | set ztics -1,0.5,1 33 | set grid z 34 | set border 4095 35 | splot sin(x) * cos(y) 36 | pause -1 "Hit return to continue (4)" 37 | 38 | unset grid 39 | set ztics autofreq 40 | set border 31 41 | set view 75,230 42 | set contour 43 | replot 44 | pause -1 "Hit return to continue (5)" 45 | 46 | set view 80,30,1,1 47 | set style data lines 48 | # autoranging loses the verticals 49 | set xrange [0:15] 50 | set yrange [0:15] 51 | splot "glass.dat" using 1 52 | pause -1 "Hit return to continue (6)" 53 | 54 | set view 50 55 | set grid 56 | replot 57 | pause -1 "Hit return to continue (7)" 58 | 59 | reset 60 | 61 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/hidden2.dem: -------------------------------------------------------------------------------- 1 | # 2 | # PM3D surfaces are not fully included in the calculation of hidden line removal. 3 | # Older versions of gnuplot allowed you to approximate the correct occlusion 4 | # by drawing the surface twice, once "with pm3d" to produce the surface you 5 | # want to show, and once "with lines lt -2" to include the same surface in 6 | # hidden3d calculations but drawn with invisible lines. 7 | # Current gnuplot does the approximation for you so the extra copy of the 8 | # surface is no longer necessary. 9 | # 10 | set isosamples 25,25 11 | set xyplane at 0 12 | unset key 13 | 14 | set palette rgbformulae 31,-11,32 15 | set style fill solid 0.5 16 | set cbrange [-1:1] 17 | 18 | set title "Mixing pm3d surfaces with hidden-line plots" 19 | 20 | f(x,y) = sin(-sqrt((x+5)**2+(y-7)**2)*0.5) 21 | 22 | set hidden3d front 23 | splot f(x,y) with pm3d, x*x-y*y with lines lc rgb "black" 24 | 25 | pause -1 "Hit return to continue" 26 | reset 27 | 28 | # 29 | # Another example of pm3d hidden surface removal, 30 | # this time using pm3d depth-ordering 31 | # 32 | set multiplot title "Interlocking Tori" 33 | set title "PM3D surface\nno depth sorting" 34 | 35 | set parametric 36 | set urange [-pi:pi] 37 | set vrange [-pi:pi] 38 | set isosamples 50,20 39 | 40 | set origin -0.02,0.0 41 | set size 0.55, 0.9 42 | 43 | unset key 44 | unset xtics 45 | unset ytics 46 | unset ztics 47 | set border 0 48 | set view 60, 30, 1.5, 0.9 49 | unset colorbox 50 | 51 | set pm3d scansbackward 52 | splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 53 | 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d 54 | 55 | set title "PM3D surface\ndepth sorting" 56 | 57 | set origin 0.40,0.0 58 | set size 0.55, 0.9 59 | set colorbox vertical user origin 0.9, 0.15 size 0.02, 0.50 60 | set format cb "%.1f" 61 | 62 | set pm3d depthorder 63 | splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 64 | 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d 65 | 66 | unset multiplot 67 | 68 | pause -1 "Hit return to continue" 69 | 70 | reset 71 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/histograms.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Example of using histogram modes 3 | # 4 | reset 5 | set title "US immigration from Europe by decade" 6 | set datafile missing "-" 7 | set xtics nomirror rotate by -45 8 | set key noenhanced 9 | # 10 | # First plot using linespoints 11 | set style data linespoints 12 | plot 'immigration.dat' using 2:xtic(1) title columnheader(2), \ 13 | for [i=3:22] '' using i title columnheader(i) 14 | # 15 | pause -1 " to plot the same data as a histogram" 16 | # 17 | set title "US immigration from Northern Europe\nPlot selected data columns as histogram of clustered boxes" 18 | set auto x 19 | set yrange [0:300000] 20 | set style data histogram 21 | set style histogram cluster gap 1 22 | set style fill solid border -1 23 | set boxwidth 0.9 24 | set xtic rotate by -45 scale 0 25 | #set bmargin 10 26 | plot 'immigration.dat' using 6:xtic(1) ti col, '' u 12 ti col, '' u 13 ti col, '' u 14 ti col 27 | # 28 | pause -1 " to change the gap between clusters" 29 | # 30 | set title "US immigration from Northern Europe\n(same plot with larger gap between clusters)" 31 | set style histogram gap 5 32 | replot 33 | # 34 | pause -1 " to plot the same dataset as stacked histogram" 35 | # 36 | # 37 | # Stacked histograms 38 | # 39 | set title "US immigration from Europe by decade\nPlot as stacked histogram" 40 | set key invert reverse Left outside 41 | set key autotitle columnheader 42 | set yrange [0:7e6] 43 | set auto x 44 | unset xtics 45 | set xtics nomirror rotate by -45 scale 0 46 | set style data histogram 47 | set style histogram rowstacked 48 | set style fill solid border -1 49 | set boxwidth 0.75 50 | # 51 | plot 'immigration.dat' using 2:xtic(1), for [i=3:22] '' using i 52 | # 53 | pause -1 " to rescale each stack to % of total" 54 | # 55 | # Stacked histograms by percent 56 | # 57 | set title "US immigration from Europe by decade\nFraction of total plotted as stacked histogram" 58 | set key invert reverse Left outside 59 | set yrange [0:100] 60 | set ylabel "% of total" 61 | unset ytics 62 | set grid y 63 | set border 3 64 | set style data histograms 65 | set style histogram rowstacked 66 | set style fill solid border -1 67 | set boxwidth 0.75 68 | # 69 | plot 'immigration.dat' using (100.*$2/$24):xtic(1) t column(2), \ 70 | for [i=3:23] '' using (100.*column(i)/column(24)) title column(i) 71 | # 72 | pause -1 "Now try histograms stacked by columns" 73 | # 74 | # Columnstacks 75 | # xtic labels should be picked up from column heads ('title column') 76 | # key titles should be picked up from row heads ('key(1)') 77 | # 78 | set title "Immigration from Northern Europe\n(columstacked histogram)" 79 | set style histogram columnstacked 80 | set key noinvert box 81 | set yrange [0:*] 82 | set ylabel "Immigration by decade" 83 | set xlabel "Country of Origin" 84 | set tics scale 0.0 85 | set ytics 86 | unset xtics 87 | set xtics norotate nomirror 88 | plot 'immigration.dat' using 6 ti col, '' using 12 ti col, \ 89 | '' using 13 ti col, '' using 14:key(1) ti col 90 | # 91 | pause -1 "Next we do several sets of parallel histograms" 92 | # 93 | # 'newhistogram' keyword to plot 94 | # 95 | set title "Immigration from different regions\n(give each histogram a separate title)" 96 | set key under nobox 97 | set style histogram clustered gap 1 title offset 2,0.25 98 | set style fill solid noborder 99 | set boxwidth 0.95 100 | unset xtics 101 | set xtics nomirror rotate by -45 scale 0 font ",8" 102 | set xlabel "(note: histogram titles have specified offset relative to X-axis label)" offset 0,-2 103 | set ytics font ",8" 104 | set grid y 105 | set auto y 106 | plot \ 107 | newhistogram "Northern Europe", \ 108 | 'immigration.dat' using "Sweden":xtic(1) t col, '' u "Denmark" t col, '' u "Norway" t col, \ 109 | newhistogram "Southern Europe", \ 110 | '' u "Greece":xtic(1) t col, '' u "Romania" t col, '' u "Yugoslavia" t col, \ 111 | newhistogram "British Isles", \ 112 | '' u "Ireland":xtic(1) t col, '' u "United_Kingdom" t col 113 | # 114 | pause -1 "Same plot using rowstacked histogram" 115 | # 116 | set style histogram rows 117 | set boxwidth 0.8 118 | set yrange [0:900000] 119 | set xlabel "(Same plot using rowstacked rather than clustered histogram)" 120 | replot 121 | # 122 | pause -1 " to finish histogram demo" 123 | 124 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/histograms2.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Example of using histogram modes 3 | # 4 | reset 5 | set title "US immigration from Europe by decade" 6 | set datafile missing "-" 7 | set xtics nomirror rotate by -45 8 | set key noenhanced 9 | # 10 | # 'newhistogram' keyword to plot 11 | # 12 | set title "Default Histogram Colouring" 13 | set key under 14 | set key invert autotitle columnhead 15 | set style data histogram 16 | set style histogram clustered gap 1 title offset 2,-2 font ",11" boxed 17 | set style fill solid noborder 18 | set boxwidth 0.95 19 | unset xtics 20 | set xtics rotate by -45 21 | set xlabel "Immigration from different regions" offset 0, 0 22 | set ytics 23 | set grid y 24 | set auto y 25 | set bmargin 12 26 | # 27 | plot \ 28 | newhistogram "Northern Europe", \ 29 | 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ 30 | newhistogram "Southern Europe", \ 31 | '' u 9:xtic(1), '' u 17 , '' u 22 , \ 32 | newhistogram "British Isles", \ 33 | '' u 10:xtic(1) , '' u 21 34 | # 35 | pause -1 "Same plot using explicit histogram start colors" 36 | set title "Explicit start color in 'newhistogram' command" 37 | plot \ 38 | newhistogram "Northern Europe" lt 4, \ 39 | 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ 40 | newhistogram "Southern Europe" lt 4, \ 41 | '' u 9:xtic(1), '' u 17, '' u 22, \ 42 | newhistogram "British Isles" lt 4, \ 43 | '' u 10:xtic(1), '' u 21 44 | # 45 | # 46 | pause -1 "Same plot using explicit histogram start pattern" 47 | set title "Explicit start pattern in 'newhistogram' command" 48 | set style fill pattern 1 border -1 49 | plot \ 50 | newhistogram "Northern Europe" fs pattern 1, \ 51 | 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ 52 | newhistogram "Southern Europe" fs pattern 1, \ 53 | '' u 9:xtic(1), '' u 17, '' u 22, \ 54 | newhistogram "British Isles" fs pattern 1, \ 55 | '' u 10:xtic(1), '' u 21 56 | # 57 | # 58 | pause -1 "Same plot with both explicit color and pattern" 59 | set title "Explicit start pattern and linetype" 60 | set style fill pattern 1 border -1 61 | plot \ 62 | newhistogram "Northern Europe" lt 2 fs pattern 1, \ 63 | 'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ 64 | newhistogram "Southern Europe" lt 2 fs pattern 1, \ 65 | '' u 9:xtic(1), '' u 17, '' u 22, \ 66 | newhistogram "British Isles" lt 2 fs pattern 1, \ 67 | '' u 10:xtic(1), '' u 21 68 | # 69 | # 70 | pause -1 71 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/html/canvas_utf8.dem: -------------------------------------------------------------------------------- 1 | # Ethan A Merritt - April 2009 2 | # 3 | # Test/Demonstration of UTF-8 support by gnuplot canvas terminal. 4 | # 5 | # First we dump all 7-bit characters by octal code value, then display a 6 | # selection of 8-bit unicode (UTF-8) characters from various code points. 7 | # 8 | set term canvas size 700,500 fsize 15 jsdir "." 9 | set output 'canvas_utf8.html' 10 | # 11 | set encoding utf8 12 | set termoption enhanced 13 | # 14 | set label 100 at screen 0.5, 0.95 center 15 | set label 100 "Dump ascii characters and supported UTF-8 unicode characters" 16 | # 17 | set border 0 18 | unset xtics 19 | unset ytics 20 | # 21 | set label 101 "{/=10 page 0 (Latin1)}" at screen 0.05, 0.85 22 | set label 102 "{/=10 0020-003F:}" at screen 0.05, 0.80 23 | set label 103 "{/=10 0040-005F:}" at screen 0.05, 0.75 24 | set label 104 "{/=10 0060-007E:}" at screen 0.05, 0.70 25 | set label 105 "{/=10 00A0-00BF:}" at screen 0.05, 0.65 26 | set label 106 "{/=10 00C0-00DF:}" at screen 0.05, 0.60 27 | set label 107 "{/=10 00E0-00FF:}" at screen 0.05, 0.55 28 | #set label 108 "{/=10 page 1:}" at screen 0.05, 0.50 29 | set label 109 "{/=10 Greek:}" at screen 0.05, 0.45 30 | set label 110 "{/=10 page 33:}" at screen 0.05, 0.35 31 | set label 111 "{/=10 page 34:}" at screen 0.05, 0.30 32 | set label 112 "{/=10 other:}" at screen 0.05, 0.25 33 | set label 113 "" at screen 0.05, 0.20 34 | # 35 | set label 1 at screen 0.2, 0.85 noenhance 36 | set label 2 at screen 0.2, 0.80 noenhance 37 | set label 3 at screen 0.2, 0.75 noenhance 38 | set label 4 at screen 0.2, 0.70 noenhance 39 | set label 5 at screen 0.2, 0.65 noenhance 40 | set label 6 at screen 0.2, 0.60 noenhance 41 | set label 7 at screen 0.2, 0.55 noenhance 42 | set label 8 at screen 0.2, 0.50 noenhance 43 | set label 9 at screen 0.2, 0.45 noenhance 44 | set label 10 at screen 0.2, 0.40 noenhance 45 | set label 11 at screen 0.2, 0.35 noenhance 46 | set label 12 at screen 0.2, 0.30 noenhance 47 | set label 13 at screen 0.2, 0.25 noenhance 48 | # 49 | set label 2 "\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077" 50 | set label 3 "\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137" 51 | set label 4 "\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176" 52 | 53 | set label 5 " ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿" 54 | set label 6 "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß" 55 | set label 7 "àáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" 56 | #set label 8 "ČčŠšŽž" 57 | 58 | set label 9 "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ" 59 | set label 10 "αβγδεζηθικλμνξοπρςστυφχψωϑϕϖ" 60 | set label 11 "ℏℯℵ←↑→↓" 61 | set label 12 "∂∆∇∈∉∑∘∙√∞∧∨∩∪∫≠≃≈≤≥⊂⊃⊆⊇⊕⊗⊙" 62 | set label 13 "ƒ ′ ″ ☉ Å" 63 | set label 14 "" 64 | # 65 | set xrange [-1:1] 66 | set yrange [-1:1] 67 | plot -10 notitle 68 | # 69 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/html/mouseable.dem: -------------------------------------------------------------------------------- 1 | set terminal canvas size 500,350 fsize 10 lw 1 name "gnuplot_canvas" jsdir "." 2 | set output 'mouseable.js' 3 | set key box 4 | set logscale y 10 5 | set samples 300, 300 6 | set title "Ag 108 decay data" 7 | set xlabel "Time (sec)" 8 | set ylabel "Rate" 9 | set grid x y mx my 10 | S = 1 11 | plot "silver.dat" t "rate" w errorb, \ 12 | "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)", \ 13 | "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)", \ 14 | "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)" 15 | 16 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/hypertext.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrates how to attach hypertext to points so that 3 | # the text is displayed on mouse-over. 4 | # Not much to see here unless you are using the wxt, svg, qt, 5 | # or HTML5 canvas terminal. 6 | # 7 | set title 'Hypertext is shown when the mouse is over a point' 8 | 9 | Scale(size) = 0.08*sqrt(sqrt(column(size))) 10 | City(String,Size) = sprintf("%s\npop: %d", stringcolumn(String), column(Size)) 11 | 12 | set termoption enhanced 13 | save_encoding = GPVAL_ENCODING 14 | set encoding utf8 15 | unset xtics 16 | unset ytics 17 | unset key 18 | set border 0 19 | set size square 20 | set datafile separator "\t" 21 | 22 | plot 'cities.dat' using 5:4:(City(1,3)):(Scale(3)) \ 23 | with labels hypertext point pt 7 ps var lc rgb "#ffee99", \ 24 | 'cities.dat' using 5:4:(City(1,3)):(Scale(3)) \ 25 | with labels hypertext point pt 6 ps var lc rgb "black" lw 0.1 26 | 27 | pause -1 "hit return to continue" 28 | set encoding save_encoding 29 | reset -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/imageNaN.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Explore the effect of image data pixels that are 3 | # missing/NaN/Inf/garbage/... 4 | # Test 2D and 3D versions of the generic and 5 | # terminal-optimized image code. 6 | # The four tests should all come out the same. 7 | # 8 | 9 | set title "Treatment of missing/undefined/NaN/Inf data" 10 | unset key 11 | set tic scale 0 12 | set border 3 front 13 | 14 | set cbrange [-2:7] 15 | set cblabel "Score" 16 | set cbtics 0,1,5 17 | 18 | set xrange [-0.5:5.5] 19 | set yrange [-0.5:5.5] 20 | 21 | set datafile missing "?" 22 | set ytics ("-Inf" 5, "Inf" 4, "NaN" 3, "Junk" 2, "?" 1, "0" 0) 23 | set xtics 1 24 | 25 | # Define the test data as a named data block 26 | $matrixdata << EOD 27 | 0 5 4 3 1 0 28 | ? 2 2 0 0 1 29 | Junk 1 2 3 4 5 30 | NaN 0 0 3 1 0 31 | Inf 3 2 0 2 3 32 | -Inf 0 1 2 4 3 33 | EOD 34 | 35 | set xlabel "First column contains various odd values" offset 0,1 36 | 37 | set view map 38 | plot $matrixdata matrix with image 39 | 40 | pause -1 "Hit return to continue" 41 | # 42 | # 43 | set title "Same thing in 'pixels' mode (2D)" 44 | 45 | plot $matrixdata matrix with image pixels 46 | 47 | pause -1 "Hit return to continue" 48 | 49 | set title "Same thing passing data value through 'using 1:2:($3)'" 50 | 51 | plot $matrixdata matrix using 1:2:($3) with image pixels 52 | 53 | pause -1 "Hit return to continue" 54 | 55 | set title "Same thing in 3D mode" 56 | 57 | splot $matrixdata matrix with image 58 | 59 | pause -1 "Hit return to continue" 60 | 61 | set title "Same thing in 'pixels' mode (3D)" 62 | 63 | splot $matrixdata matrix with image pixels 64 | 65 | pause -1 "Hit return to continue" 66 | 67 | set title "3D image with pixel value in 4th column" 68 | 69 | splot $matrixdata matrix using 1:2:(0):3 with image 70 | 71 | pause -1 "Hit return to continue" 72 | 73 | reset 74 | 75 | $DATA << EOD 76 | 0 0 0 77 | 0 1 -1 78 | 0 2 -4 79 | 0 3 -9 80 | 81 | 1 0 1 82 | 1 1 0 83 | 1 2 -3 84 | 1 3 -8 85 | 86 | 2 0 4 87 | 2 1 3 88 | 2 2 0 89 | 2 3 -5 90 | 91 | 3 0 9 92 | 3 1 8 93 | 3 2 NaN 94 | 3 3 9 95 | 96 | EOD 97 | 98 | set title "image from non-matrix data" 99 | set termopt enhanced 100 | set label 1 at 3,2 "NaN pixel \nshould appear as\nbackground" front center 101 | plot $DATA with image 102 | pause -1 103 | reset 104 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/iterate.dem: -------------------------------------------------------------------------------- 1 | set title "Iteration within plot command" 2 | set xrange [0:3] 3 | set label 1 "plot for [n=2:10] sin(x*n)/n" at graph .95, graph .92 right 4 | plot for [n=2:10] sin(x*n)/n notitle lw (13-n)/2 5 | pause -1 "Hit return to continue" 6 | reset 7 | 8 | set title "Iteration over all available data in a file" 9 | set view 38., 341. 10 | unset xtics 11 | unset ytics 12 | unset ztics 13 | set border 0 14 | set lmargin at screen 0.09 15 | set rmargin at screen 0.90 16 | set key outside below samplen 0.6 17 | set key title "splot for [scan=1:*] 'whale.dat' index scan" 18 | set key maxrows 6 19 | splot for [i=1:*] "whale.dat" index i title sprintf("scan %d",i) with lines 20 | pause -1 "Hit return to continue" 21 | reset 22 | 23 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/kdensity2d.dem: -------------------------------------------------------------------------------- 1 | reset 2 | load "gen-random.inc" 3 | 4 | set title "How to plot a kernel density estimate for this 2D dataset?" 5 | plot $random using 1:2 6 | 7 | pause -1 "Press Return to continue - the plot may take some time to appear" 8 | 9 | set view map 10 | set palette defined (0 'white', 1 'red') 11 | set dgrid3d 50,50 gauss kdensity 12 | set title "set dgrid3d 50,50 gauss kdensity" 13 | 14 | splot $random using 1:2:(1) with pm3d 15 | 16 | pause -1 "Press Return to continue - the plot may take some time to appear" 17 | 18 | set dgrid3d 50,50 gauss kdensity 0.1 19 | set title "set dgrid3d 50,50 gauss kdensity 0.1" 20 | 21 | replot 22 | 23 | pause -1 "Hit return to continue" 24 | reset 25 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/line.fnc: -------------------------------------------------------------------------------- 1 | # 2 | # a straight line 3 | # 4 | 5 | l(x) = y0 + m*x 6 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/lines_arrows.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Combine dot/dash, linecolor, and arrowstyle demos into a single file. 3 | # Demonstrate explicit choice of both dot/dash pattern (linetype) 4 | # and color (linecolor). 5 | # 6 | set termoption dash 7 | 8 | reset 9 | set xrange [-0.5:3.5] 10 | set yrange [-1:1.4] 11 | set bmargin 7 12 | unset ytics 13 | unset xtics 14 | # 15 | set title "Independent colors and dot/dash styles" 16 | unset colorbox 17 | # 18 | # reset linetypes to base dash patterns 19 | # 20 | set for [i=1:5] linetype i dt i 21 | 22 | # 23 | # define line styles using explicit rgbcolor names 24 | # 25 | set style line 1 lt 2 lc rgb "red" lw 3 26 | set style line 2 lt 2 lc rgb "orange" lw 2 27 | set style line 3 lt 2 lc rgb "yellow" lw 3 28 | set style line 4 lt 2 lc rgb "green" lw 2 29 | 30 | # 31 | set label 1 'set style line 1 lt 2 lc rgb "red" lw 3' at -0.4, -0.25 tc rgb "red" 32 | set label 2 'set style line 2 lt 2 lc rgb "orange" lw 2' at -0.4, -0.35 tc rgb "orange" 33 | set label 3 'set style line 3 lt 2 lc rgb "yellow" lw 3' at -0.4, -0.45 tc rgb "yellow" 34 | set label 4 'set style line 4 lt 2 lc rgb "green" lw 2' at -0.4, -0.55 tc rgb "green" 35 | set label 5 'plot ... lt 1 lc 3 ' at -0.4, -0.65 tc lt 3 36 | set label 6 'plot ... lt 3 lc 3 ' at -0.4, -0.75 tc lt 3 37 | set label 7 'plot ... lt 5 lc 3 ' at -0.4, -0.85 tc lt 3 38 | # 39 | set xlabel "You will only see dashed lines if your current terminal setting permits it" 40 | # 41 | show style line 42 | # 43 | # draw some plots 44 | # 45 | plot cos(x) ls 1 title 'ls 1', \ 46 | cos(x-.2) ls 2 title 'ls 2',\ 47 | cos(x-.4) ls 3 title 'ls 3',\ 48 | cos(x-.6) ls 4 title 'ls 4', \ 49 | cos(x-.8) lt 1 lc 3 title 'lt 1 lc 3', \ 50 | cos(x-1.) lt 3 lc 3 title 'lt 3 lc 3', \ 51 | cos(x-1.2) lt 5 lc 3 title 'lt 5 lc 3' 52 | 53 | # 54 | pause -1 "Hit return to continue" 55 | 56 | unset for [i=1:8] label i 57 | set title "The pointinterval property is another way to create interrupted lines" 58 | set xlabel "This technique works best for equally spaced data points" 59 | set bmargin 6 60 | set offset .05, .05 61 | set xrange [-0.5:3.3] 62 | set style func linespoints 63 | 64 | plot cos(x) lt -1 pi -4 pt 6 title 'pi -4', \ 65 | cos(x-.8) lt -1 pi -3 pt 7 ps 0.2 title 'pi -3 pt 7 ps 0.2', \ 66 | cos(x-.2) lt -1 pi -6 pt 7 title 'pi -6',\ 67 | cos(x-.4) lt -1 pi -3 pt 4 title 'pi -3',\ 68 | cos(x-.6) lt -1 pi -5 pt 5 title 'pi -5', \ 69 | cos(x-1.) with line lt -1 notitle, \ 70 | cos(x+.2) with line lt -1 lw 2 title 'lw 2' 71 | 72 | # 73 | pause -1 "Hit return to continue" 74 | 75 | set title "The pointinterval property also works with character point symbols" 76 | set style data linespoints 77 | set pointintervalbox 1.5 78 | unset xlabel 79 | myencoding = GPVAL_ENCODING 80 | set encoding utf8 81 | 82 | plot '+' using 1:(cos(x-1.)) with line lt -1 lw 1 title 'lw 1', \ 83 | '+' using 1:(cos(x)) lt -1 pi -4 pt "C" title 'pi -4', \ 84 | '+' using 1:(cos(x-.8)) lt -1 pi -3 pt "D" title 'pi -3 pt "D"', \ 85 | '+' using 1:(cos(x-.2)) lt -1 pi -6 pt "✠" tc rgb "blue" title 'pi -6 tc rgb "blue"',\ 86 | '+' using 1:(cos(x-.4)) lt -1 pi -3 pt "✲" title 'pi -3',\ 87 | '+' using 1:(cos(x-.6)) lt -1 pi -5 pt "☺" title 'pi -5', \ 88 | '+' using 1:(cos(x+.2)) with line lt -1 lw 2 title 'lw 2' 89 | 90 | pause -1 "Hit return to continue" 91 | 92 | set encoding myencoding 93 | reset 94 | 95 | set xrange [-1000:1000] 96 | set yrange [-178:86] 97 | set tics scale 0 98 | 99 | set style line 1 lt 1 lw 2 100 | set style line 2 lt 1 lc rgb "skyblue" lw 2 101 | 102 | set style arrow 1 head filled size screen 0.025,30,45 ls 1 103 | set style arrow 2 head nofilled size screen 0.03,15 ls 2 104 | set style arrow 3 head filled size screen 0.03,15,45 ls 1 105 | set style arrow 4 head filled size screen 0.03,15 ls 2 106 | set style arrow 5 heads filled size screen 0.03,15,135 ls 1 107 | set style arrow 6 head empty size screen 0.03,15,135 ls 2 108 | set style arrow 7 nohead ls 1 109 | set style arrow 8 heads size screen 0.008,90 ls 2 110 | 111 | print ' We have defined the following arrowstyles:' 112 | show style arrow 113 | 114 | set arrow from -500,-100 to 500,-100 as 1 115 | set arrow from -500,-110 to 500,-110 as 2 116 | set arrow from -500,-120 to 500,-120 as 3 117 | set arrow from -500,-130 to 500,-130 as 4 118 | set arrow from -500,-140 to 500,-140 as 5 119 | set arrow from -500,-150 to 500,-150 as 6 120 | set arrow from -500,-160 to 500,-160 as 7 121 | set arrow from -500,-170 to 500,-170 as 8 122 | 123 | set label 'arrowstyle 1:' at -520,-100 right 124 | set label 'arrowstyle 2:' at -520,-110 right 125 | set label 'arrowstyle 3:' at -520,-120 right 126 | set label 'arrowstyle 4:' at -520,-130 right 127 | set label 'arrowstyle 5:' at -520,-140 right 128 | set label 'arrowstyle 6:' at -520,-150 right 129 | set label 'arrowstyle 7:' at -520,-160 right 130 | set label 'arrowstyle 8:' at -520,-170 right 131 | 132 | set title 'Top: plot with vectors arrowstyle 1, Bottom: explicit arrows' 133 | plot 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 3 134 | pause -1 "Hit return to continue" 135 | reset 136 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/linkedaxes.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo for non-linear linked axes. 3 | # In this example x2 is proportional to 1/x. 4 | # X axis is X-ray energy in eV; x2 axis is wavelength in Angstroms. 5 | # 6 | # The scattering data are pulled from the web using the GET 7 | # command, which is provided by the perl-libwww module. 8 | # You could replace it with wget or some other download tool, or you 9 | # could manually download the data first and then plot from the local copy. 10 | # 11 | # For more information on the plot itself see 12 | # http://www.bmsc.washington.edu/scatter 13 | # 14 | # Ethan A Merritt - August 2012 15 | # 16 | set encoding utf8 17 | set key outside Left 18 | set bmargin 5 19 | set tmargin 6 20 | set style data lines 21 | set tics in 22 | set ticslevel 0.5 23 | set xlabel "X-ray energy in eV" 24 | set format y '%5.1fe' 25 | set title " Anomalous scattering factors " 26 | set xrange [9000:14400] 27 | set offset 0,0,1.0,0 28 | set xtics nomirror 29 | set link x via 12398./x inverse 12398./x 30 | 31 | set x2label "X-ray wavelength in Å" 32 | set x2tics 0.1 format "%.1f Å" nomirror 33 | 34 | Brdata = "< GET http://www.bmsc.washington.edu/scatter/data/Br.dat" 35 | Tadata = "< GET http://www.bmsc.washington.edu/scatter/data/Ta.dat" 36 | 37 | plot Brdata volatile using 1:3 title 'Br f"' lt 1 lw 3, \ 38 | '' volatile using 1:2 title "Br f'" lt 1 lw 1, \ 39 | Tadata volatile using 1:3 title 'Ta f"' lt 2 lw 3, \ 40 | '' volatile using 1:2 title "Ta f'" lt 2 lw 1 41 | 42 | pause -1 "Hit return to continue" 43 | reset 44 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/macros.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Exercise use of macro substitution 3 | # 4 | set macros 5 | 6 | title = "Test of command line macro substitution" 7 | style1 = "points" 8 | style2 = "lines lw 2" 9 | plot1 = "'1.dat' using 1:2 with @style1" 10 | plot2 = "'1.dat' using 1:($2+1) with @style2" 11 | plot3 = '@plot2' 12 | plot4 = '@plot3' 13 | plot5 = '@plot4' 14 | plot6 = '@plot5' 15 | # 16 | set title title 17 | plot @plot1 title 'plot1', \ 18 | @plot2 title 'plot2' 19 | show var 20 | # 21 | pause -1 " to test limit on recursion depth" 22 | # 23 | print "testing depth 3" 24 | plot @plot1 title 'plot1', @plot3 lt 3 title 'Recursion depth 3' 25 | pause 1 26 | print "testing depth 4" 27 | plot @plot1 title 'plot1', @plot4 lt 4 title 'Recursion depth 4' 28 | pause 1 29 | print "testing depth 5" 30 | plot @plot1 title 'plot1', @plot5 lt 5 title 'Recursion depth 5' 31 | pause 1 32 | # 33 | pause -1 34 | 35 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/margins.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate use of 'set {btlr}margin at screen ' 3 | # to pin plot borders to a specific place on the canvas. 4 | # This allows positioning multiple plots on the page so that their 5 | # corners line up perfectly. 6 | # 7 | # Aug 2006 - Ethan A Merritt 8 | # 9 | 10 | set multiplot title "Demo of placing multiple plots (2D and 3D)\nwith explicit alignment of plot borders" 11 | 12 | # 13 | # First plot (large) 14 | # 15 | set lmargin at screen 0.20 16 | set rmargin at screen 0.85 17 | set bmargin at screen 0.25 18 | set tmargin at screen 0.85 19 | 20 | set pm3d 21 | set palette rgbformulae 7, 5, 15 22 | set view map 23 | set samples 50, 50 24 | set isosamples 50, 50 25 | unset surface 26 | set xrange [ -15.00 : 15.00 ] 27 | set yrange [ -15.00 : 15.00 ] 28 | set zrange [ -0.250 : 1.000 ] 29 | 30 | unset xtics 31 | unset ytics 32 | 33 | unset key 34 | 35 | splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) 36 | 37 | unset pm3d 38 | unset key 39 | 40 | # 41 | # second plot (tall and narrow; at left of main plot) 42 | # 43 | set lmargin at screen 0.10 44 | set rmargin at screen 0.20 45 | 46 | set ytics 47 | 48 | set parametric 49 | set dummy u,v 50 | set view map 51 | 52 | f(h) = sin(sqrt(h**2))/sqrt(h**2) 53 | 54 | set urange [ -15.00 : 15.00 ] 55 | set vrange [ -15.00 : 15.00 ] 56 | set xrange [*:*] 57 | set surface 58 | 59 | splot f(u), u, 0 with lines lc rgb "green" 60 | 61 | unset parametric 62 | 63 | # 64 | # third plot (short and wide; at bottom of main plot) 65 | # 66 | set lmargin at screen 0.20 67 | set rmargin at screen 0.85 68 | set bmargin at screen 0.10 69 | set tmargin at screen 0.25 70 | 71 | set xrange [ -15.00 : 15.00 ] 72 | set yrange [ * : * ] 73 | set xtics 74 | unset ytics 75 | 76 | y = 0 77 | plot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) 78 | 79 | unset multiplot 80 | 81 | pause -1 "Hit return to continue" 82 | reset 83 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/matrix_index.dem: -------------------------------------------------------------------------------- 1 | $MATRICES << EOM 2 | # A garbage line at the beginning that is not an index 3 | 4 | # set1 5 | 0 0.314 0.628 6 | 2 3.06 1.51 7 | 8 1.974 1.03 8 | 9 | 10 | # set2 11 | 0 0.314 0.628 12 | 20 3.06 2.01 13 | 80 1.974 1.03 14 | 15 | 16 | # set3 17 | 0 0.314 0.628 18 | 2 1.06 3.01 19 | 8 2.974 4.03 20 | EOM 21 | 22 | set palette cubehelix 23 | unset colorbox 24 | set cbrange [1:3.6] 25 | set key box opaque samplen 0 26 | set xrange [] noextend 27 | set yrange [] noextend 28 | 29 | set multiplot layout 2,2 margins char 3,3,2,4 title "{/:Bold Data file contains labeled ascii matrices}" 30 | 31 | set title "Y range should be the same" 32 | plot '$MATRICES' nonuniform matrix index "set3" w image title "index 'set3'" 33 | set title "colors should be the same" 34 | plot '$MATRICES' nonuniform matrix index "set2" w image title "index 'set2'" 35 | unset title 36 | plot '$MATRICES' nonuniform matrix index 0 w image title "index 0" 37 | plot '$MATRICES' nonuniform matrix index 1 w image title "index 1" 38 | 39 | unset multiplot 40 | 41 | pause -1 "Hit return to continue" 42 | 43 | reset 44 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/mgr.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: mgr.dem,v 1.10 2011/04/09 23:50:05 sfeam Exp $ 3 | # 4 | print "Watch some cubic splines" 5 | set samples 50 6 | set xlabel "Angle (deg)" 7 | set ylabel "Amplitude" 8 | set key box 9 | set title "Bragg reflection -- Peak only" 10 | plot "big_peak.dat" title "Rate" with errorbars, \ 11 | "" smooth csplines t "Rate" 12 | pause -1 "You would draw smaller bars? (-> return)" 13 | set bars small 14 | replot 15 | set bars large 16 | # 17 | pause -1 "An approx-spline demo (-> return)" 18 | set samples 300 19 | set xlabel "Time (sec)" 20 | set ylabel "Rate" 21 | set title "Ag 108 decay data" 22 | plot "silver.dat" t "experimental" w errorb, \ 23 | "" smooth csplines t "cubic smooth" 24 | # error is column 3; weight larger errors less 25 | # start with rel error = 1/($3/$2) 26 | pause -1 "Now apply a smoothing spline, weighted by 1/rel error (-> return)" 27 | S=1 28 | plot "silver.dat" t "experimental" w errorb,\ 29 | "" u 1:2:(S*$2/$3) smooth acsplines t "acspline Y/Z" 30 | pause -1 "Make it smoother by changing the smoothing weights (-> return)" 31 | plot "silver.dat" t "rate" w errorb,\ 32 | "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)",\ 33 | "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)",\ 34 | "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)" 35 | pause -1 "Accentuate the relative changes with a log-scale (-> return)" 36 | set logscale y 37 | set grid x y mx my 38 | replot 39 | pause -1 "Now approximate the data with a bezier curve between the endpoints (-> return)" 40 | unset logscale y 41 | plot "silver.dat" t "experimental" w errorb,\ 42 | "" smooth sbezier t "bezier" 43 | pause -1 "You would rather use log-scales ? (-> return)" 44 | set logscale y 45 | plot "silver.dat" t "rate" w errorb, \ 46 | "" smooth sbezier t "bezier" 47 | # 48 | pause -1 "Errorbar demo (-> return)" 49 | set samples 100 50 | unset logscale 51 | unset grid 52 | set xlabel "Resistance [Ohm]" 53 | set ylabel "Power [W]" 54 | set title "UM1-Cell Power" 55 | n(x)=1.53**2*x/(5.67+x)**2 56 | plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines 57 | pause -1 "Would you like boxes? (-> return)" 58 | plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines 59 | pause -1 "Only X-Bars? (-> return)" 60 | plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines 61 | pause -1 "Only Y-Bars? (-> return)" 62 | plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines 63 | pause -1 "Logscaled? (-> return)" 64 | set logscale y 65 | plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines 66 | pause -1 "X as well? (-> return)" 67 | set logscale xy 68 | plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines 69 | pause -1 "If you like bars without tics (-> return)" 70 | unset logscale 71 | set bars small 72 | plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines 73 | pause -1 "X-Bars only (-> return)" 74 | plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines 75 | pause -1 "Y-Bars only (-> return)" 76 | plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines 77 | reset 78 | 79 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/molecule.dem: -------------------------------------------------------------------------------- 1 | set title "GM1 pentasaccharide ball-and-stick representation" 2 | 3 | set hidden3d 4 | set border 0 5 | unset xtics 6 | unset ytics 7 | unset ztics 8 | set view equal xyz 9 | 10 | splot 'GM1_sugar.pdb' using 6:7:8 with points lt 3 pt 7 ps 3 notitle, \ 11 | 'GM1_bonds.r3d' using 1:2:3:($5-$1):($6-$2):($7-$3) with vectors nohead lw 3 lt 1 \ 12 | title "GM1 pentasaccharide" 13 | 14 | pause -1 "Hit return to continue" 15 | set title "Hidden3d mode with a mixture of surfaces, points, and lines" 16 | replot 18 notitle 17 | 18 | pause -1 "Hit return to continue" 19 | 20 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/mouselab_1.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: mouselab_1.dem,v 1.1 2006/07/10 19:49:54 sfeam Exp $ 3 | # 4 | # Demonstrate screen interaction using mouse variables 5 | # 6 | # MOUSE_X MOUSE_Y MOUSE_KEY MOUSE_CHAR 7 | # 8 | # On entry, LID is the identifier for the previous label 9 | # 10 | LID = LID + 1 11 | set label 2 sprintf(">>> READY FOR LABEL %d <<<",LID-100) 12 | set label 2 at graph .02, graph .65 tc lt (LID-100) 13 | replot 14 | 15 | # 16 | # Get mouse position and first character of label 17 | # 18 | pause mouse key 19 | LABEL = MOUSE_CHAR 20 | LABEL_X = MOUSE_X 21 | LABEL_Y = MOUSE_Y 22 | set label LID LABEL at LABEL_X, LABEL_Y 23 | replot 24 | # 25 | # Call routine that catches keystrokes one by one and 26 | # updates the label 27 | # 28 | load "mouselab_2.dem" 29 | # 30 | # Print out final label details 31 | # 32 | show label LID 33 | 34 | # 35 | # Loop until we see an 36 | # 37 | if (MOUSE_KEY != 27) reread 38 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/mouselab_2.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: mouselab_2.dem,v 1.1 2006/07/10 19:49:54 sfeam Exp $ 3 | # 4 | # Wait for keystroke in plot window 5 | # 6 | pause mouse key 7 | # 8 | # Add new printable character to label 9 | # 10 | if (31 < MOUSE_KEY && MOUSE_KEY < 127) \ 11 | LABEL = LABEL.MOUSE_CHAR 12 | # 13 | # Add newline to label if input character was 14 | # 15 | if (MOUSE_KEY == 13) \ 16 | LABEL = LABEL."\n" 17 | # 18 | # Delete previous character from label on or 19 | # 20 | if (MOUSE_KEY == 8 || MOUSE_KEY == 127) \ 21 | LABEL = LABEL[1:strlen(LABEL)-1] 22 | # 23 | # Allow arrow keys to tweak label position 24 | # The GP_Up GP_Right GP_Down GP_Left (1008-1011) are defined in mousecmn.h 25 | # 26 | if (MOUSE_KEY == 1009) LABEL_Y = LABEL_Y + (GPVAL_Y_MAX-GPVAL_Y_MIN)/100. 27 | if (MOUSE_KEY == 1010) LABEL_X = LABEL_X + (GPVAL_X_MAX-GPVAL_X_MIN)/100. 28 | if (MOUSE_KEY == 1011) LABEL_Y = LABEL_Y - (GPVAL_Y_MAX-GPVAL_Y_MIN)/100. 29 | if (MOUSE_KEY == 1008) LABEL_X = LABEL_X - (GPVAL_X_MAX-GPVAL_X_MIN)/100. 30 | # 31 | # Update label 32 | # 33 | set label LID LABEL at LABEL_X, LABEL_Y 34 | replot 35 | # 36 | # DEBUG feedback 37 | # print "<",MOUSE_KEY,">" 38 | # 39 | # Return to caller on or , otherwise loop 40 | # 41 | if (MOUSE_KEY != 27 && MOUSE_CHAR ne " ") reread 42 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/mouselabels.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: mouselabels.dem,v 1.2 2006/07/10 21:06:11 sfeam Exp $ 3 | # 4 | # Demonstrate screen interaction using mouse variables 5 | # 6 | # MOUSE_X MOUSE_Y MOUSE_KEY MOUSE_CHAR 7 | # 8 | 9 | set termoption enhanced 10 | 11 | set title "Demo interactive placement of labels using mouse feedback" 12 | set label 1 at graph 0.02, graph 0.9 13 | set label 1 "Position mouse at desired start of label and start typing\nEnhanced text syntax may be used\nArrow keys will reposition label as you go\n or allows editing\n to terminate this label\n to terminate demo" 14 | 15 | set border 0 16 | unset xtics 17 | unset ytics 18 | set key box 19 | 20 | plot sin(13*besj0(x))/x 21 | 22 | # 23 | # Initialize label identifier 24 | # 25 | LID = 100 26 | 27 | # 28 | # Loop over interactive placement of new labels 29 | # 30 | load "mouselab_1.dem" 31 | show label 32 | 33 | # 34 | # All done with demo 35 | # 36 | unset label 1 37 | set label 2 "DONE" 38 | replot 39 | pause -1 "Hit to continue" 40 | reset 41 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/mousevariables.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: mousevariables.dem,v 1.8 2006/07/10 19:49:54 sfeam Exp $ 3 | # 4 | # Demonstrate use of user variables 5 | # MOUSE_BUTTON MOUSE_X MOUSE_Y MOUSE_X2 MOUSE_Y2 6 | # and built-in function exists("") 7 | # 8 | reset 9 | set title "Scripted zoom using exported MOUSE variables" 10 | set samples 200 11 | set label 3 at graph 0.1, graph 0.9 tc lt 3 12 | set label 3 "Click on one corner of desired zoom region" 13 | plot sin(13*besj0(x))/x 14 | # 15 | pause mouse "Click on one corner of desired zoom region" 16 | # 17 | if (exists("MOUSE_BUTTON")) \ 18 | print "Mouse button ", MOUSE_BUTTON, " at ", MOUSE_X, " ", MOUSE_Y ;\ 19 | set label 1 sprintf(" Mouse button %d\n clicked here!", MOUSE_BUTTON) ;\ 20 | set label 1 at MOUSE_X, MOUSE_Y ;\ 21 | set label 1 point pt 6 ps 6 ;\ 22 | replot ;\ 23 | else \ 24 | print "No mouse click?" ;\ 25 | exit ; 26 | # 27 | BOT_X = MOUSE_X 28 | BOT_Y = MOUSE_Y 29 | set label 3 "Click on diagonal corner of desired zoom region" 30 | replot 31 | # 32 | pause mouse "Click on diagonal corner of desired zoom region" 33 | # 34 | if (exists("MOUSE_BUTTON")) \ 35 | print "Mouse button ", MOUSE_BUTTON, " at ", MOUSE_X, " ", MOUSE_Y ;\ 36 | set label 2 sprintf(" Mouse button %d\n clicked here!", MOUSE_BUTTON) ;\ 37 | set label 2 at MOUSE_X, MOUSE_Y ;\ 38 | set label 2 point pt 6 ps 6 ;\ 39 | replot ;\ 40 | else \ 41 | print "No mouse click?" ;\ 42 | exit ; 43 | # 44 | # 45 | TOP_X = MOUSE_X 46 | TOP_Y = MOUSE_Y 47 | # 48 | set label 3 "Plot will zoom in 3 seconds" 49 | replot 50 | pause 3 51 | # 52 | set xrange [ BOT_X : TOP_X ] 53 | set yrange [ BOT_Y : TOP_Y ] 54 | set grid 55 | # 56 | unset label 1 57 | unset label 2 58 | unset label 3 59 | set label 4 sprintf("zoom x range %.3f to %.3f",BOT_X,TOP_X) 60 | set label 5 sprintf("zoom y range %.3f to %.3f",TOP_X,TOP_Y) 61 | set label 4 at graph 0.1, graph 0.95 tc lt 3 62 | set label 5 at graph 0.1, graph 0.90 tc lt 3 63 | replot 64 | # 65 | print "Zoomed to xrange ",BOT_X," ",TOP_X 66 | print "Zoomed to yrange ",BOT_Y," ",TOP_Y 67 | # 68 | pause -1 "Type to continue" 69 | 70 | reset 71 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/multiaxis.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: multiaxis.dem,v 1.1 2007/06/09 22:10:45 sfeam Exp $ 3 | # 4 | 5 | # Use the 3rd plot of the electronics demo to show off 6 | # the use of multiple x and y axes in the same plot. 7 | # 8 | A(jw) = ({0,1}*jw/({0,1}*jw+p1)) * (1/(1+{0,1}*jw/p2)) 9 | p1 = 10 10 | p2 = 10000 11 | set dummy jw 12 | set grid x y2 13 | set key center top title " " 14 | set logscale xy 15 | set log x2 16 | unset log y2 17 | set title "Transistor Amplitude and Phase Frequency Response" 18 | set xlabel "jw (radians)" 19 | set xrange [1.1 : 90000.0] 20 | set x2range [1.1 : 90000.0] 21 | set ylabel "magnitude of A(jw)" 22 | set y2label "Phase of A(jw) (degrees)" 23 | set ytics nomirror 24 | set y2tics 25 | set tics out 26 | set autoscale y 27 | set autoscale y2 28 | plot abs(A(jw)) axes x1y1, 180./pi*arg(A(jw)) axes x2y2 29 | 30 | pause -1 "Hit return to continue" 31 | 32 | # undo what we've done 33 | reset 34 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/multimsh.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: multimsh.dem,v 1.5 2003/10/28 05:35:54 sfeam Exp $ 3 | # 4 | set parametric 5 | set hidden3d 6 | unset key 7 | set xrange [0:8] 8 | set yrange [-4:4] 9 | set zrange [-2:2] 10 | set style data line 11 | set title "Demo of multiple mesh per file capability - Digitized Blue Whale" 12 | splot "whale.dat" 13 | pause -1 "Press Return" 14 | set title "Demo of multiple mesh per file capability - Digitized Blue Whale" 15 | set xlabel "Mesh or Network 0" 16 | splot "whale.dat" index 0 17 | pause -1 "Press Return" 18 | 19 | set autoscale z 20 | set xlabel "Mesh or Network 6" 21 | set autoscale z 22 | splot "whale.dat" index 6 using 3:2:1 23 | pause -1 "Press Return" 24 | 25 | set zrange [-2:2] 26 | set xlabel "Mesh or Network 12" 27 | splot "whale.dat" index 12 with points 28 | pause -1 "Press Return" 29 | 30 | set xlabel "Mesh or Network 13" 31 | splot "whale.dat" index 13 32 | pause -1 "Press Return - A Loop over Indices could be done with reread" 33 | 34 | # #file "loop" 35 | # maxmsh = 16 36 | # ind = (ind + 1)%maxmsh 37 | # splot "whale.dat" i ind 38 | # reread "loop" 39 | 40 | set xlabel "Mesh or Network 4" 41 | splot "whale.dat" index 4 42 | pause -1 "Press Return" 43 | 44 | set xlabel "Mesh or Network 5" 45 | splot "whale.dat" index 5 46 | pause -1 "Press Return" 47 | 48 | reset 49 | 50 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/multipalette.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Test case of multiplot containing more than one palette 3 | # (for debugging) 4 | # 5 | set pm3d map 6 | set multiplot layout 2,1 \ 7 | title "Test ability to display multiple palettes within a single multiplot" 8 | set title '10 gray levels' 9 | set palette gray 10 | set palette maxcolors 10 11 | splot x*x 12 | set title '2 colors' 13 | set palette color 14 | set palette maxcolors 2 15 | splot x 16 | unset multiplot 17 | pause -1 "Hit return to continue" 18 | 19 | reset 20 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/multiplt.dem: -------------------------------------------------------------------------------- 1 | # GNUPLOT v3.6 beta multiplot script file 2 | # 3 | # Second Order System Characteristics 4 | # 5 | # D**2 + 2*zeta*wn*D + (wn**2)y = (wn**2)*x 6 | # 7 | # x input variable 8 | # y output variable 9 | # w frequency ratio (w/wn) 10 | # wn natural frequency 11 | # wd damped natural frequency 12 | # zeta damping ratio 13 | # mag(w) amplitude response 14 | # phi(w) phase response 15 | # wdwn damped natural frequency ratio 16 | # wnt normalized time 17 | # 18 | # Plots: 19 | # Frequency domain magnitude response 20 | # phase response 21 | # 22 | # Time domain unit step response 23 | # unit impulse response 24 | # 25 | # 26 | # Created by: W. D. Kirby email: wdkirby@ix.netcom.com 27 | # Date: 1/18/96 28 | # Released to the public domain with no warranty of any kind 29 | # 30 | reset 31 | set style function lines 32 | set size 1.0, 1.0 33 | set origin 0.0, 0.0 34 | set multiplot 35 | set size 0.5,0.5 36 | set origin 0.0,0.5 37 | set grid 38 | unset key 39 | set angles radians 40 | set samples 250 41 | # Plot Magnitude Response 42 | set title "Second Order System Transfer Function - Magnitude" 43 | mag(w) = -10*log10( (1-w**2)**2 + 4*(zeta*w)**2) 44 | set dummy w 45 | set logscale x 46 | set xlabel "Frequency (w/wn)" 47 | set ylabel "Magnitude (dB)" offset 1,0 48 | set label 1 "Damping =.1,.2,.3,.4,.5,.707,1.0,2.0" at .14,17 49 | set xrange [.1:10] 50 | set yrange [-40:20] 51 | plot \ 52 | zeta=.1,mag(w), \ 53 | zeta=.2,mag(w), \ 54 | zeta=.3,mag(w), \ 55 | zeta=.4,mag(w), \ 56 | zeta=.5,mag(w), \ 57 | zeta=.707,mag(w), \ 58 | zeta=1.0,mag(w), \ 59 | zeta=2.0,mag(w),-6 60 | # Plot Phase Response 61 | set size 0.5,0.5 62 | set origin 0.0,0.0 63 | set title "Second Order System Transfer Function - Phase" 64 | set label 1 "" 65 | set ylabel "Phase (deg)" offset 1,0 66 | set ytics -180, 30, 0 67 | set yrange [-180:0] 68 | tmp(w) = (-180/pi)*atan( 2*zeta*w/(1-w**2) ) 69 | # Fix for atan function wrap problem 70 | tmp1(w)= w<1?tmp(w):(tmp(w)-180) 71 | phi(w)=zeta==1?(-2*(180/pi)*atan(w)):tmp1(w) 72 | plot \ 73 | zeta=.1,phi(w), \ 74 | zeta=.2,phi(w), \ 75 | zeta=.3,phi(w), \ 76 | zeta=.4,phi(w), \ 77 | zeta=.5,phi(w), \ 78 | zeta=.707,phi(w), \ 79 | zeta=1,phi(w), \ 80 | zeta=2.0,phi(w), \ 81 | -90 82 | # Plot Step Response 83 | set size 0.5,0.5 84 | set origin 0.5,0.5 85 | set dummy wnt 86 | unset logscale x 87 | set title "Second Order System - Unit Step Response" 88 | set ylabel "Amplitude y(wnt)" offset 1,0 89 | set xlabel "Normalized Time (wnt)" 90 | set xrange [0:20] 91 | set xtics 0,5,20 92 | set yrange [0:2.0] 93 | set ytics 0, .5, 2.0 94 | set mytics 5 95 | set mxtics 10 96 | wdwn(zeta)=sqrt(1-zeta**2) 97 | shift(zeta) = atan(wdwn(zeta)/zeta) 98 | alpha(zeta)=zeta>1?sqrt(zeta**2-1.0):0 99 | tau1(zeta)=1/(zeta-alpha(zeta)) 100 | tau2(zeta)=1/(zeta+alpha(zeta)) 101 | c1(zeta)=(zeta + alpha(zeta))/(2*alpha(zeta)) 102 | c2(zeta)=c1(zeta)-1 103 | y1(wnt)=zeta==1?1 - exp(-wnt)*(wnt + 1):0 104 | y2(wnt)=zeta<1?(1 - (exp(-zeta*wnt)/wdwn(zeta))*sin(wdwn(zeta)*wnt + shift(zeta))):y1(wnt) 105 | y(wnt)=zeta>1?1-c1(zeta)*exp(-wnt/tau1(zeta))+c2(zeta)*exp(-wnt/tau2(zeta)):y2(wnt) 106 | plot \ 107 | zeta=.1,y(wnt), \ 108 | zeta=.2,y(wnt), \ 109 | zeta=.3,y(wnt), \ 110 | zeta=.4,y(wnt), \ 111 | zeta=.5,y(wnt), \ 112 | zeta=.707,y(wnt), \ 113 | zeta=1,y(wnt), \ 114 | zeta=2,y(wnt) 115 | # 116 | # Plot Impulse Response 117 | set origin .5,0. 118 | set title "Second Order System - Unit Impulse Response" 119 | y(wnt)=exp(-zeta*wnt) * sin(wdwn(zeta)*wnt) / wdwn(zeta) 120 | set yrange [-1. :1.] 121 | set ytics -1,.5,1. 122 | plot \ 123 | zeta=.1,y(wnt), \ 124 | zeta=.2,y(wnt), \ 125 | zeta=.3,y(wnt), \ 126 | zeta=.4,y(wnt), \ 127 | zeta=.5,y(wnt), \ 128 | zeta=.707,y(wnt), \ 129 | zeta=1,y(wnt), \ 130 | zeta=2,y(wnt) 131 | unset multiplot 132 | pause -1 "Hit return to continue" 133 | # 134 | # Clean up: reset parameter defaults 135 | # 136 | reset 137 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/named_var.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Plot a function of a named variable 3 | # i.e. f(gamma) rather than f(x) 4 | # 5 | set title "Plot a function of a named variable" 6 | set xlabel "gamma" 7 | 8 | plot [gamma=0.6:1.2] \ 9 | [0:20] \ 10 | fdivm=1.2, \ 11 | omega = 0.8, \ 12 | lambda=0.051, \ 13 | f(gamma)=fdivm/sqrt((omega**2 - gamma**2)**2 + 4 * lambda**2 * gamma**2), \ 14 | f(gamma) title "f(gamma)" with lines linewidth 6 15 | 16 | pause -1 "Hit return to continue" 17 | 18 | reset 19 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/nokey.dem: -------------------------------------------------------------------------------- 1 | set title "Position plot titles at the end of the corresponding curve\nrather than in a separate key" 2 | set auto fix 3 | unset key 4 | set rmargin at screen 0.8 5 | set datafile sep '\t' 6 | set xtics nomirror scale 0 7 | set ytics nomirror 8 | set border 2 lw 2 9 | set style data lines 10 | plot for [place in "Germany Greece Denmark France"] 'immigration.dat' \ 11 | using 1:(column(place)) lw 2 title columnhead at end 12 | 13 | pause -1 "Hit return to continue" 14 | 15 | reset 16 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/orbits.dem: -------------------------------------------------------------------------------- 1 | # Ellipse demo - 2D Solar System viewer 2 | 3 | reset 4 | 5 | set zeroaxis 6 | set xtics axis 7 | set ytics axis 8 | set size ratio 1 9 | set xrange [-40:40] 10 | set yrange [-40:40] 11 | unset border 12 | set key right out 13 | set title "Orbits of selected Solar System objects" 14 | set angles degrees 15 | set datafile separator "\t" 16 | if (strstrt(GNUTERM,"wxt")) \ 17 | set label 1 "Use Ctrl+mousewheel to zoom!" at graph 0.5,0.05 center 18 | 19 | fn = 'orbital_elements.dat' 20 | 21 | # functions to calculate the parameters of the ellipses from orbital elements 22 | # the actual 3D orbits are projected onto the ecliptic plane 23 | f1(w,W,i) = cos(w)*cos(W)-sin(w)*sin(W)*cos(i) 24 | f2(w,W,i) = cos(w)*sin(W)+sin(w)*cos(W)*cos(i) 25 | 26 | angle(w,W,i) = atan2(f2(w,W,i), f1(w,W,i)) 27 | # center coordinates 28 | cx(a,e,i,w,W) = -a*e*f1(w,W,i) 29 | cy(a,e,i,w,W) = -a*e*f2(w,W,i) 30 | # axes 31 | fa(a,e,i,w,W) = 2*a*sqrt(1-sin(w)**2*sin(i)**2) 32 | fb(a,e,i,w,W) = 2*a*sqrt(1-e**2)*sqrt(1-cos(w)**2*sin(i)**2) 33 | afromq(q,e) = q/(1-e) 34 | 35 | # the ellipse style needs five columns: 36 | # center x, center y, major axis, minor axis, orientation 37 | 38 | plot fn using (cx($2,$3,$4,$5,$6)):\ 39 | (cy($2,$3,$4,$5,$6)):\ 40 | (fa($2,$3,$4,$5,$6)):\ 41 | (fb($2,$3,$4,$5,$6)):\ 42 | (angle($5,$6,$4)) index 0 with ellipses lw 3 title "Planets",\ 43 | fn using (cx($2,$3,$4,$5,$6)):\ 44 | (cy($2,$3,$4,$5,$6)):\ 45 | (fa($2,$3,$4,$5,$6)):\ 46 | (fb($2,$3,$4,$5,$6)):\ 47 | (angle($5,$6,$4)) index 1 every ::0::20 with ellipses lw 1 title "Minor planets",\ 48 | fn using (cx($2,$3,$4,$5,$6)):\ 49 | (cy($2,$3,$4,$5,$6)):\ 50 | (fa($2,$3,$4,$5,$6)):\ 51 | (fb($2,$3,$4,$5,$6)):\ 52 | (angle($5,$6,$4)) index 2 every ::0::10 with ellipses lw 1 title "Comets",\ 53 | fn using (cx($2,$3,$4,$5,$6)):\ 54 | (cy($2,$3,$4,$5,$6)):\ 55 | (fa($2,$3,$4,$5,$6)):\ 56 | (fb($2,$3,$4,$5,$6)):\ 57 | (angle($5,$6,$4)) index 3 every ::0::10 with ellipses lw 1 title "Distant objects" 58 | 59 | pause -1 60 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/parallel.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Parallel axis plot 3 | # shows plot layout but would better use some real data set 4 | # 5 | set title "Parallel Axis Plot" font ",15" 6 | 7 | set border 0 8 | unset key 9 | set xrange [] noextend 10 | unset ytics 11 | 12 | # Use x-axis tic positions to label the axes 13 | set xtics 1 format "axis %g" scale 0,0 14 | 15 | # Turn on axis tics for the parallel axes 16 | set for [i=1:5] paxis i tics 17 | 18 | # Use the range commands to create an "interesting" plot. 19 | # For suitable input data this is the sort of result you 20 | # might get without axis range manipulation. 21 | 22 | set paxis 2 range [0:30] 23 | set paxis 4 range [-10:50] 24 | set paxis 5 range [50:*] reverse 25 | set paxis 5 tics left offset 4 26 | 27 | plot 'silver.dat' using 2:3:1:($3/2):2:(int($0/25)) with parallel lt 1 lc variable 28 | 29 | pause -1 "Hit return to continue" 30 | 31 | reset 32 | 33 | set title "Parallel Axis Plot" font ",15" 34 | 35 | set border 0 36 | unset ytics 37 | set xtics ("X" 1, "Y" 2, "Z" 3, "B" 4) nomirror 38 | set xrange [] noextend 39 | unset key 40 | 41 | set paxis 1 tics format '%.0f Å' offset -1 42 | set paxis 4 tics left offset 4 format '%.0f Å^2' 43 | set paxis 4 range [0:40] 44 | 45 | plot 'GM1_sugar.pdb' using 6:7:8:10:5 with parallel lc var lw 2 46 | 47 | pause -1 "Hit return to continue" 48 | 49 | reset 50 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/param.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: param.dem,v 1.6 2014/01/11 05:35:46 sfeam Exp $ 3 | # 4 | # Show some of the new parametric capabilities. 5 | # 6 | set parametric 7 | set dummy t 8 | set autoscale 9 | set samples 160 10 | set title "" 11 | set key box 12 | set key below 13 | plot t,sin(t)/t title "t,sin(t)/t or sin(x)/x" 14 | pause -1 "Hit return to continue" 15 | 16 | plot sin(t)/t,t 17 | pause -1 "Hit return to continue" 18 | 19 | plot sin(t),cos(t) 20 | pause -1 "Hit return to continue" 21 | 22 | set xrange [-3:3] 23 | set yrange [-3:3] 24 | set title "Parametric Conic Sections" 25 | plot -t,t,cos(t),cos(2*t),2*cos(t),sin(t),-cosh(t),sinh(t) 26 | set title "" 27 | pause -1 "Hit return to continue" 28 | 29 | set xrange [-5:5] 30 | set yrange [-5:5] 31 | plot tan(t),t,t,tan(t) 32 | pause -1 "Hit return to continue" 33 | 34 | set trange [0.00001:3] 35 | plot t,log(t),-t,log(t),sin(t),t**2,-sin(t),t**2 36 | pause -1 "Hit return to continue" 37 | 38 | set autoscale x 39 | set yrange [-1.5:1.5] 40 | set trange [0.0001:10*pi] 41 | plot sin(t)/t,cos(t)/t 42 | pause -1 "Hit return to continue" 43 | 44 | # 45 | # Decouple range of parametric axes u/v from that of display axes x/y/z 46 | # 47 | reset 48 | set label 1 "Decouple range of parametric axes u/v\nfrom that of display axes x/y/z" 49 | set label 1 at screen 0.1, 0.9 50 | unset colorbox 51 | set palette cubehelix cycle 3 52 | set view equal xyz 53 | set view 120, 300 54 | set xyplane 0 55 | set pm3d depthorder 56 | set border 4095 57 | set tics scale 0 58 | set format "" 59 | set angles radians 60 | xx(u, v) = cos(v) * cos(u) 61 | yy(u, v) = cos(v) * sin(u) 62 | zz(u, v) = sin(v) 63 | color(u, v) = sin(2*u)+sin(2*v) 64 | # 65 | set parametric 66 | set isosamples 121, 61 67 | set samples 121, 61 68 | set urange [-pi:pi] 69 | set vrange [-pi/2:pi/2] 70 | set xrange [-1:1] 71 | set yrange [-1:1] 72 | set zrange [-1:1] 73 | splot "++" using (xx($1,$2)):(yy($1,$2)):(zz($1,$2)):(color($1,$2)) with pm3d notitle 74 | pause -1 75 | 76 | # undo what we've done above 77 | reset 78 | 79 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/piecewise.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo of plotting piecewise functions 3 | # 4 | unset border 5 | set key center top reverse Left 6 | set xzeroaxis 7 | set yzeroaxis 8 | set xtics axis out scale 1,8 9 | set xtics add (1.00000 1, 6.28319 1) 10 | set ytics axis 11 | set title "Piecewise function sampling" font ",15" 12 | set xrange [ -2 : 10 ] noreverse nowriteback 13 | 14 | plot sample [*:1] x, [1:2.*pi] cos(x), [2.*pi:10] (x-8)**2 15 | 16 | pause -1 "Hit to continue" 17 | reset 18 | # 19 | # This example taken from 20 | # http://amca01.wordpress.com/2012/05/29/a-piecewise-polynomial-approximation-to-the-normal-cdf/ 21 | # Original approximation from John Hoyt (1962), The American Statistician 22:25-26. 22 | # 23 | set termopt enhanced 24 | set termopt dash 25 | save_encoding = GPVAL_ENCODING; set encoding utf8 26 | 27 | set title "Piecewise approximation to the\nNormal Cumulative Distribution Function" 28 | 29 | set format "%.1f" 30 | set key left Left reverse invert 31 | set style data lines 32 | set xtics nomirror 33 | set xrange [ 0 : 4 ] 34 | set yrange [ 0.5 : 1.1 ] 35 | set style line 1 lt 0 lw 3 36 | set style line 2 lt 0 lw 3 lc rgb "red" 37 | 38 | part1(x) = 0.5 + (9.*x-x**3)/ 24. 39 | part2(x) = 1.0 + (x-3.0)**3 / 48. 40 | 41 | part1 = "part1: for x < 1 norm(x) ≈ ½ + (9x-x^3) / 24" 42 | part2 = "part2: for x > 1 norm(x) ≈ 1 + (x-3)^3 / 48" 43 | 44 | set label 1 at 1.0, 0.62 45 | set label 1 "plot norm(x), [0:1] part1(x), [1:4] part2(x)" 46 | set arrow 1 from 1.,.7 to 1.,.9 nohead 47 | 48 | plot norm(x) lt -1, \ 49 | [1:4] part2(x) ls 2 title part2, \ 50 | [0:1] part1(x) ls 1 title part1 51 | 52 | pause -1 "Hit to continue" 53 | 54 | set termopt solid 55 | reset 56 | 57 | set border 16 58 | unset xtics 59 | unset ytics 60 | set style data lines 61 | set key center at screen 0.5, screen 0.15 62 | set title font ",15" 63 | set title "Piecewise function of one parameter in 3D" 64 | 65 | splot [-2:2][-2:2] sample \ 66 | [h=1:5] '+' using (cos(h)):(sin(h)):(h), \ 67 | [h=5:10] '+' using (cos(h)):(sin(h)):(h), \ 68 | [h=10:15] '+' using (cos(h)):(sin(h)):(h) 69 | 70 | pause -1 "Hit to continue" 71 | 72 | set encoding save_encoding 73 | reset 74 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/plugin/plugin.dem: -------------------------------------------------------------------------------- 1 | # 2 | # demo for the use of external functions 3 | # 4 | if (!strstrt(GPVAL_COMPILE_OPTIONS,"+EXTERNAL_FUNCTIONS")) { 5 | print ">>> Skipping demo <<<\n" ; 6 | print "This copy of gnuplot does not support import of external functions" 7 | exit 8 | } 9 | 10 | # This will look for an exported routined named divisors 11 | # in shared object example.so 12 | set title "import divisors from 'sharedobject'" 13 | import divisors(x) from "demo_plugin" 14 | set samples 10001, 10001 15 | plot [0:10000] divisors(x) w his 16 | 17 | pause -1 " to continue" 18 | 19 | # This will cause future invocations of g(x) to call the 20 | # routine sinc(x) contained in shared object example.so 21 | # I.e. g(x) is an alias for an external function sinc(x) 22 | set title "import g(x) from 'sharedobject:sinc'" 23 | import g(x) from "demo_plugin:sinc" 24 | plot [-20:20] g(x) 25 | 26 | pause -1 " to continue" 27 | 28 | # compare internal and external implementations of sinc(x) 29 | set title "Compare internal and external implementations of sinc" 30 | set samples 250 31 | sinc(x) = sin(x) / x 32 | plot sinc(x) - g(x) 33 | 34 | pause -1 " to continue" 35 | 36 | # Similar to above but using a 2-parameter function 37 | set title "Import a 2-parameter function" 38 | import nsinc(N,x) from "demo_plugin:nsinc" 39 | plot for [N=1:5] nsinc(N,x) lw 2 title sprintf("nsinc(%d,x)",N) 40 | 41 | pause -1 " to continue" 42 | 43 | reset 44 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/pm3dgamma.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: pm3dgamma.dem,v 1.2 2003/10/17 15:02:21 mikulik Exp $ 3 | # 4 | # Test of gamma correction for gray palettes 5 | 6 | set pm3d; set palette 7 | set palette gray 8 | set pm3d map 9 | set cbrange [-10:10] 10 | set xrange [-10:10] 11 | set yrange [*:*] 12 | unset ztics 13 | unset ytics 14 | set samples 101 15 | set isosamples 2 16 | set xtics 2 17 | 18 | set palette gamma 0.75 19 | set title "gamma = 0.75" 20 | splot x 21 | pause -1 "Hit return to continue" 22 | 23 | 24 | set palette gamma 1.0 25 | set title "gamma = 1.0" 26 | splot x 27 | pause -1 "Hit return to continue" 28 | 29 | 30 | set palette gamma 1.25 31 | set title "gamma = 1.25" 32 | splot x 33 | pause -1 "Hit return to continue" 34 | 35 | 36 | set palette gamma 1.5 37 | set title "gamma = 1.5" 38 | splot x 39 | pause -1 "Hit return to continue" 40 | 41 | 42 | set palette gamma 1.75 43 | set title "gamma = 1.75" 44 | splot x 45 | pause -1 "Hit return to continue" 46 | 47 | 48 | set palette gamma 2.0 49 | set title "gamma = 2.0" 50 | splot x 51 | pause -1 "Hit return to continue" 52 | 53 | reset 54 | 55 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/pointsize.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Read individual point sizes from extra column of input file 3 | # Ethan A Merritt - October 2004 4 | # 5 | unset key 6 | unset border 7 | unset yzeroaxis 8 | unset xtics 9 | unset ytics 10 | unset ztics 11 | 12 | # 13 | # plot a 2D map with locations marked by variable sized points 14 | # 15 | set title "plot with variable size points" 16 | plot 'world.dat' with lines lt 3, \ 17 | 'world.cor' using 1:2:(5.*rand(0)) with points lt 1 pt 6 ps variable 18 | pause -1 "Hit return to continue" 19 | 20 | # 21 | set title "splot with variable size points\nit is possible to specify size and color separately" 22 | set view map 23 | unset hidden3d 24 | splot 'world.dat' using 1:2:(0) with lines lt 3, \ 25 | 'world.cor' using 1:2:(0.5-rand(0)):(5.*rand(0)) with points pt 5 ps var lt palette 26 | pause -1 "Hit return to continue" 27 | 28 | # 29 | # plot a '3D version using spherical coordinate system' of the world. 30 | set angles degrees 31 | set title "3D version using spherical coordinate system" 32 | set ticslevel 0 33 | set view 70,40,0.8,1.2 34 | set mapping spherical 35 | set parametric 36 | set samples 32 37 | set isosamples 9 38 | set urange [-90:90] 39 | set vrange [0:360] 40 | splot cos(u)*cos(v),cos(u)*sin(v),sin(u) with lines lt 5,\ 41 | 'world.dat' with lines lt 3, \ 42 | 'world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps variable 43 | pause -1 "Hit return to continue" 44 | 45 | # 46 | # hidden3d still not working fully 47 | # pointsize is now handled, but axes are never obscured 48 | # 49 | set title "3D solid version through hiddenlining" 50 | set hidden3d 51 | set arrow from 0,0,-1.2 to 0,0,1.2 lt 5 lw 2 52 | set arrow from -1.2, 0, 0 to 1.2, 0, 0 nohead lt 5 lw 1 53 | set arrow from 0, -1.2, 0 to 0, 1.2, 0 nohead lt 5 lw 1 54 | splot cos(u)*cos(v),-cos(u)*sin(v),sin(u) with lines lt 5,\ 55 | 'world.dat' u 1:2:(1.001) with lines lt 3, \ 56 | 'world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps var 57 | pause -1 "Hit return to continue" 58 | 59 | reset 60 | 61 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/polar.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: polar.dem,v 1.8 2010/11/19 05:15:03 sfeam Exp $ 3 | # 4 | # Show some of the new polar capabilities. 5 | # 6 | unset border 7 | set clip 8 | set polar 9 | set xtics axis nomirror 10 | set ytics axis nomirror 11 | unset rtics 12 | set samples 160 13 | set zeroaxis 14 | set trange [0:2*pi] 15 | set title "Three circles (with aspect ratio distortion)" 16 | plot .5,1,1.5 17 | pause -1 "Hit return to continue" 18 | set title "" 19 | set key box 20 | 21 | plot cos(2*t) 22 | pause -1 "Hit return to continue" 23 | 24 | plot 2*sqrt(cos(t)),-2*sqrt(cos(t)) 25 | pause -1 "Hit return to continue" 26 | 27 | plot sin(4*t),cos(4*t) 28 | set offset 0,0,0,0 29 | pause -1 "Hit return to continue" 30 | 31 | set xrange [-5:5] 32 | set yrange [-5:5] 33 | plot t/cos(3*t) 34 | pause -1 "Hit return to continue" 35 | set autoscale 36 | 37 | plot 1-sin(t) 38 | pause -1 "Hit return to continue" 39 | 40 | set trange [0:12*pi] 41 | plot 2*t 42 | pause -1 "Hit return to continue" 43 | 44 | butterfly(x)=exp(cos(x))-2*cos(4*x)+sin(x/12)**5 45 | set samples 800 46 | set title "Butterfly" 47 | unset key 48 | plot butterfly(t) 49 | pause -1 "Hit return to continue" 50 | reset 51 | 52 | set polar 53 | set grid polar 54 | unset xtics 55 | unset ytics 56 | set border 0 57 | set style fill solid 0.5 58 | set rrange [0.1 : 4] 59 | set size square 60 | set key title "bounding radius 2.5" 61 | set key outside top right samplen 0.7 62 | 63 | plot 3.+sin(t)*cos(5*t) with filledcurve above r=2.5 notitle,\ 64 | 3.+sin(t)*cos(5*t) with line 65 | 66 | pause -1 "Hit return to continue" 67 | # undo what we've done above 68 | reset 69 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/rainbow.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate use of pm3d palette colors for 2D plots 3 | # terminal-independent color choices 4 | # 5 | reset 6 | # 7 | set title "Terminal-independent RGB colors in 2D" 8 | set xlabel "Implemented using built-in rgb color names\n(only works for terminals that can do full rgb color)" 9 | # 10 | set xrange [-0.5:3.5] 11 | set yrange [-1:1.4] 12 | set bmargin 7 13 | unset ytics 14 | unset xtics 15 | # 16 | # define line styles using explicit rgbcolor names 17 | # 18 | set style line 1 lt rgb "red" lw 3 19 | set style line 2 lt rgb "orange" lw 2 20 | set style line 3 lt rgb "yellow" lw 3 21 | set style line 4 lt rgb "green" lw 2 22 | set style line 5 lt rgb "cyan" lw 3 23 | set style line 6 lt rgb "blue" lw 2 24 | set style line 7 lt rgb "violet" lw 3 25 | # 26 | set label 1 'set style line 1 lt rgb "red" lw 3' at -0.4, -0.25 tc rgb "red" 27 | set label 2 'set style line 2 lt rgb "orange" lw 2' at -0.4, -0.35 tc rgb "orange" 28 | set label 3 'set style line 3 lt rgb "yellow" lw 3' at -0.4, -0.45 tc rgb "yellow" 29 | set label 4 'set style line 4 lt rgb "green" lw 2' at -0.4, -0.55 tc rgb "green" 30 | set label 5 'set style line 5 lt rgb "cyan" lw 3' at -0.4, -0.65 tc rgb "cyan" 31 | set label 6 'set style line 6 lt rgb "blue" lw 2' at -0.4, -0.75 tc rgb "blue" 32 | set label 7 'set style line 7 lt rgb "violet" lw 3' at -0.4, -0.85 tc rgb "violet" 33 | # 34 | print '' 35 | print '# These are the input commands' 36 | print '' 37 | print ' set style line 1 lt rgb "red" lw 3' 38 | print ' set style line 2 lt rgb "orange" lw 2' 39 | print ' set style line 3 lt rgb "yellow" lw 3' 40 | print ' set style line 4 lt rgb "green" lw 2' 41 | print ' set style line 5 lt rgb "cyan" lw 3' 42 | print ' set style line 6 lt rgb "blue" lw 2' 43 | print ' set style line 7 lt rgb "violet" lw 3' 44 | print '' 45 | print '# And this is the result' 46 | # 47 | show style line 48 | # 49 | # draw some plots 50 | # 51 | plot cos(x) ls 1 title 'red', \ 52 | cos(x-.2) ls 2 title 'orange',\ 53 | cos(x-.4) ls 3 title 'yellow',\ 54 | cos(x-.6) ls 4 title 'green', \ 55 | cos(x-.8) ls 5 title 'cyan', \ 56 | cos(x-1.) ls 6 title 'blue', \ 57 | cos(x-1.2) ls 7 title 'violet' 58 | # 59 | pause -1 "Hit return to continue" 60 | 61 | 62 | set title "Terminal-independent palette colors in 2D\nImplemented using command line macros referring to a fixed HSV palette" 63 | set colorbox horizontal user origin .1,.08 size .8,.05 64 | set xlabel 'HSV color wheel' 65 | # 66 | unset label 1 67 | unset label 2 68 | unset label 3 69 | unset label 4 70 | unset label 5 71 | unset label 6 72 | unset label 7 73 | # 74 | # Load terminal-independent colorwheel (HSV full saturation) 75 | # 76 | load 'colorwheel.dem' 77 | 78 | #### -- colorwheel.dem 79 | # 80 | # Set palette to HSV color wheel and define common colors as macros 81 | # This allows commands like 82 | # plot sin(x) with lines @orange 83 | # 84 | set palette mode HSV 85 | set palette defined ( 0 0 1 1, 1 1 1 1 ) 86 | set cbrange [0:1] 87 | red = "lt pal frac 0" 88 | orange = "lt pal frac 0.10" 89 | yellow = "lt pal frac 0.16" 90 | green = "lt pal frac 0.33" 91 | cyan = "lt pal frac 0.5" 92 | blue = "lt pal frac 0.66" 93 | violet = "lt pal frac 0.79" 94 | magenta = "lt pal frac 0.83" 95 | black = "lt -1" 96 | set macros 97 | #### -- colorwheel.dem 98 | 99 | # 100 | # define line styles using macros and a fixed palette 101 | # 102 | set style line 1 @red lw 3 103 | set style line 2 @orange lw 2 104 | set style line 3 @yellow lw 3 105 | set style line 4 @green lw 2 106 | set style line 5 @cyan lw 3 107 | set style line 6 @blue lw 2 108 | set style line 7 @violet lw 3 109 | 110 | replot 111 | 112 | pause -1 "Hit return to continue" 113 | 114 | reset 115 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/rectangle.dem: -------------------------------------------------------------------------------- 1 | # demo for the use of "set object rectangle" 2 | # Updated for version 5 3 | # show front/back/behind, opaque key box 4 | 5 | set object 1 rect from 0,0 to 1,4 fc lt 2 front 6 | set object 2 rect from -1,1 to 0,5 fc rgb "gold" 7 | set object 5 rect from 0, -3 to 2, -2 fc rgb "cyan" fs pattern 1 bo -1 8 | 9 | set style fill pattern 2 bo 1 10 | 11 | # 12 | # Test clipping and placement in the presence of an inverted axis range 13 | # 14 | set obj 4 rect at -4,0 size 3,1 15 | set label 4 at -2.6,0 "There should be a\nclipped rectangle here" left offset 0,.5 16 | 17 | # 18 | # The key box has its own option "opaque" to generate a filled rectangle 19 | # 20 | set key box opaque height 2 21 | 22 | # 23 | # Illustrate using character widths to put a box around a label 24 | # 25 | LABEL = "Label in a box" 26 | set obj 10 rect at -3,-4 size char strlen(LABEL), char 1 27 | set obj 10 fillstyle empty border -1 front 28 | set label 10 at -3,-4 LABEL front center 29 | 30 | set obj 9 rect from -4, -4 to -4, -3 fc lt -1 31 | 32 | set obj 20 rect from graph 0, graph 0 to graph 1, graph 1 fs solid 0.15 fc rgb "#FFD700" behind 33 | 34 | set xrange [5:-5] 35 | 36 | plot x, -3+sin(x*5)/x lt 3 lw 3 37 | 38 | pause -1 "Hit return to continue" 39 | 40 | reset 41 | 42 | # 43 | # Requires data file "using.dat" from this directory, 44 | # so change current working directory to this directory before running. 45 | # 46 | 47 | set xrange [1:8] 48 | set title "Convex November 1-7 1989" 49 | set key below 50 | set label "(Weekend)" at 5,25 center 51 | 52 | set style rect fc lt -1 fs solid 0.15 noborder 53 | 54 | set obj rect from 1, graph 0 to 2, graph 1 55 | set obj rect from 3, graph 0 to 4, graph 1 56 | set obj rect from 5, graph 0 to 6, graph 1 57 | set obj rect from 7, graph 0 to 8, graph 1 58 | 59 | plot 'using.dat' using 3:4 title "Logged in" with impulses,\ 60 | 'using.dat' using 3:5 t "Load average" with points,\ 61 | 'using.dat' using 3:6 t "%CPU used" with lines 62 | 63 | pause -1 "Hit return to continue" 64 | 65 | reset 66 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/reflect.fnc: -------------------------------------------------------------------------------- 1 | # 2 | # Model function for Reflectivity evaluation 3 | # 4 | 5 | mu = 1.130469005513490E-001 # (cm-1) @ 17.479 keV 6 | t0 = 0.18 # cm 7 | tb = 11.417823202820120 * 0.01745329251994 # thetaB (radians) 8 | A = mu * t0 / cos(tb) 9 | P = (1 + (cos(2.*tb))**2) / 2 10 | Fhkl = sqrt(3.536346308456155**2 + (4.58815426260982e-4)**2) * 0.968 11 | r0 = 2.81794092e-13 # classical electron radius 12 | lambda = 7.09338062818239e-9 # Mo K in cm 13 | V = 1.62253546981499e-23 14 | P = (1. + (cos(2.*tb))**2) / 2. 15 | # 16 | # combine constants to avoid exponential overflow on systems with 17 | # D floating point format where exponential limits are ca. 10**(+/-38) 18 | # r0liV = r0 * lambda / V 19 | r0liV = 2.81794092*7.09338062818239/1.62253546981499e-1 20 | # 21 | 22 | W(x) = 1./(sqrt(2.*pi)*eta) * exp( -1. * x**2 / (2.*eta**2) ) 23 | Y(tc) = tc/sin(tb) * Fhkl * r0liV 24 | f(tc)= (tanh(Y(tc)) + abs(cos(2.*tb)) * tanh(abs(Y(tc)*cos(2.*tb)))) / (Y(tc)*(1.+(cos(2.*tb))**2)) 25 | Q(tc) = (r0*Fhkl/V)**2 * (lambda**3/sin(2.*tb)) * P * f(tc) 26 | a(x) = W(x) * Q(tc) / mu 27 | 28 | # 29 | 30 | R(x) = sinh(A*a(x)) * exp(-1.*A*(1.+a(x))) 31 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/rgb_variable.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo of reading color information from the data file itself 3 | # 4 | 5 | # 6 | rgb(r,g,b) = int(r)*65536 + int(g)*256 + int(b) 7 | 8 | # 9 | set border 0 10 | unset xtics; unset ytics; unset ztics 11 | set rmargin 5; set lmargin 5; set bmargin 2 12 | 13 | set angle degrees 14 | xrgb(r,g,b) = (g-b)/255. * cos(30.) 15 | yrgb(r,g,b) = r/255. - (g+b)/255. * sin(30.) 16 | set arrow 1 from 0,0 to 0,1 nohead lw 3 lc rgb "red" back 17 | set arrow 2 from 0,0 to cos(-30), sin(-30) nohead lw 3 lc rgb "green" back 18 | set arrow 3 from 0,0 to cos(210), sin(210) nohead lw 3 lc rgb "blue" back 19 | 20 | set title "RGB color information read from data file" 21 | plot 'rgb_variable.dat' using (xrgb($1,$2,$3)):(yrgb($1,$2,$3)):(rgb($1,$2,$3)) \ 22 | with points pt 7 ps 4 lc rgb variable notitle 23 | pause -1 "Hit return to continue" 24 | 25 | # 26 | set title "Both RGB color information\n and point size controlled by input" 27 | plot 'rgb_variable.dat' using (xrgb($1,$2,$3)):(yrgb($1,$2,$3)):(1.+2.*rand(0)):(rgb($1,$2,$3)) \ 28 | with points pt 7 ps var lc rgb variable notitle 29 | pause -1 "Hit return to continue" 30 | 31 | # 32 | set border -1 front linetype -1 linewidth 1.000 33 | set ticslevel 0 34 | set xtics border 35 | set ytics border 36 | set ztics border 37 | # 38 | unset arrow 1 39 | unset arrow 2 40 | unset arrow 3 41 | # 42 | set xlabel "Red" tc rgb "red" 43 | set xrange [0:255] 44 | set ylabel "Green" tc rgb "green" 45 | set yrange [0:255] 46 | set zlabel "Blue" tc rgb "blue" 47 | set zrange [0:255] 48 | 49 | # 50 | splot 'rgb_variable.dat' using 1:2:3:(rgb($1,$2,$3)) with points pt 7 ps 4 lc rgb variable, \ 51 | '' using 1:2:3:(sprintf("0x%x",rgb($1,$2,$3))) with labels left offset 1 notitle 52 | pause -1 "Hit return to continue" 53 | # 54 | # 55 | # Unfortunately, not all platforms allow us to read hexadecimal constants 56 | # from a data file. Warn the user if that is the case. 57 | # 58 | if (0 == int('0x01')) \ 59 | set label 99 at screen .05, screen .15 "If you see only black dots,\nthis means your platform does not \nsupport reading hexadecimal constants\nfrom a data file. Get a newer libc." 60 | 61 | splot 'rgb_variable.dat' using 1:2:3:(5*rand(0)):4 with points pt 7 ps variable lc rgb variable \ 62 | title "variable pointsize and rgb color read as hexidecimal" 63 | 64 | pause -1 "Hit return to continue" 65 | set label 99 "" 66 | # 67 | set border 0 68 | set xtics axis nomirror 69 | set ytics axis nomirror 70 | set ztics axis nomirror 71 | set xzeroaxis lt -1 lc rgb "red" lw 2 72 | set yzeroaxis lt -1 lc rgb "green" lw 2 73 | set zzeroaxis lt -1 lc rgb "blue" lw 2 74 | set xyplane at 0.0 75 | 76 | splot 'rgb_variable.dat' using 1:2:3:(5*rand(0)):(rgb($1,$2,$3)) with points pt 7 ps variable lc rgb variable \ 77 | title "variable pointsize and rgb color computed from coords" 78 | pause -1 "Hit return to continue" 79 | 80 | set title "Demo of hidden3d with points only (no surface)" 81 | set hidden3d 82 | replot 83 | pause -1 "Hit return to continue" 84 | reset 85 | # 86 | 87 | RGB(R,G,B) = int(255.*R) * 2**16 + int(255.*G) * 2**8 + int(255.*B) 88 | 89 | set xr [0.01:1] 90 | set yr [0.01:1] 91 | set zr [0:1] 92 | set xtics ("R=1" 1) 93 | set ytics ("G=1" 1) 94 | set ztics ("0" 0, "B=1" 1) 95 | unset colorbox 96 | set isosamples 40,40 97 | set xyplane at 0.0 98 | set view 63,58,1.,1.4 99 | 100 | set title "RGB coloring of pm3d surface" 101 | unset key 102 | 103 | # Just some function that is well-defined in this range 104 | # (except at the origin) 105 | f(x,y) = 0.4 + sin(sqrt(100.*x**2+100.*y**2)) \ 106 | / (1.5*sqrt(100.*x**2+100.*y**2)) 107 | 108 | splot '++' using 1:2:(f($1,$2)):(RGB($1,$2,f($1,$2))) \ 109 | with pm3d lc rgb variable 110 | 111 | pause -1 "Hit return to continue" 112 | 113 | set title "HSV coloring of pm3d surface\n(V=1)" 114 | unset xtics 115 | unset ytics 116 | set ztics ("0" 0) 117 | set xlabel "H" 118 | set ylabel "S" 119 | 120 | splot '++' using 1:2:(f($1,$2)):(hsv2rgb($1,$2,1.0)) \ 121 | with pm3d lc rgb variable 122 | 123 | pause -1 "Hit return to continue" 124 | 125 | reset 126 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/rgba_lines.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate use of RGBA (Alpha channel + RGB) colors for lines and filled areas. 3 | # Color is represented by 32 bits AARRGGBB (i.e. Alpha is in the high bits) 4 | # Alpha = 0 is opaque; Alpha = 255 is transparent 5 | # This is BACKWARDS from the convention used by 'set style fill TRANSPARENT SOLID' 6 | # It is also BACKWARDS from the convention used by 'with rgbalpha' 7 | # 8 | set angle degrees 9 | set style arrow 1 size screen 0.03,15,90 filled 10 | 11 | if (GPVAL_TERM eq "png") LW = 1; else LW = 3 12 | 13 | do for [i = 5 : 360 : 5] { 14 | set arrow i from 0,0 to cos(i),sin(i) filled 15 | color = (int(255.*i/360.) << 24) + 0xFF0000 16 | print sprintf("%x",color) 17 | set arrow i as 1 lw LW lc rgb color 18 | } 19 | set obj 1 rect from -.5,-.5 to -.3,0 fs solid fc rgb "#00bbbbbb" front 20 | set obj 2 rect from -.3,-.3 to -.1,0.2 fs solid fc rgb "#55bbbbbb" front 21 | set obj 3 rect from -.1,-.1 to .3,0.3 fs solid fc rgb "#aabbbbbb" front 22 | set obj 4 rect from .3,-.4 to .4,0.4 fs solid fc rgb "#22bbbbbb" back 23 | set obj 10 circle at 0.15, -0.15 radius 0.5 fs solid fc rgb "cyan" behind 24 | 25 | 26 | unset border 27 | unset xtics 28 | unset ytics 29 | set xrange [-1:1] 30 | set yrange [-1:1] 31 | set size square 32 | 33 | plot 0 notitle 34 | 35 | pause -1 "Hit return to continue" 36 | reset 37 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/rgbalpha.dem: -------------------------------------------------------------------------------- 1 | set border linecolor rgb "gold" 2 | set key title "Plot style rgbalpha" textcolor rgb "gold" 3 | set key bottom left at screen .75, screen .75 4 | set key Left width -7 sample 1 5 | 6 | set object 1 rect from screen 0, 0 to screen 1, 1 behind \ 7 | fc rgb "gray10" fillstyle solid 1.00 noborder 8 | set samples 128, 128 9 | set size ratio 0.95 10 | set bmargin at screen .1 11 | set tmargin at screen .9 12 | set lmargin at screen .1 13 | 14 | 15 | set xrange [ 0. : 128. ] 16 | set yrange [ 0. : 128. ] 17 | 18 | # Alpha = linear gradient on x 19 | 20 | plot 100.*(.4+sin(x/5.)/(x/5.)) lw 5 title 'solid line', \ 21 | 'lena.rgb' binary array=(128,128) format="%uchar" flipy using 1:2:3:(2.*column(0)) \ 22 | with rgbalpha title "Lena with linear\nalpha gradient" 23 | 24 | pause -1 "Hit return to continue" 25 | 26 | # Alpha = circular mask 27 | 28 | focus(x,y) = ((column(0)-x)**2 + (column(-1)-(127-y))**2) > 400 ? 0 : 255 29 | 30 | plot 100.*(.4+sin(x/5.)/(x/5.)) lw 5 title 'solid line', \ 31 | 'lena.rgb' binary array=(128,128) format="%uchar" flipy using 1:2:3:(focus(70,50)) \ 32 | with rgbalpha title "Lena with circular mask" 33 | 34 | pause -1 "Hit return to continue" 35 | reset 36 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/rugplot.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo of a Rug Plot 3 | # The X and Y coordinates of each point are marked by a mark 4 | # on the corresponding axis. 5 | # 6 | load "gen-random.inc" 7 | 8 | unset key 9 | set bmargin at screen .2; 10 | set rmargin at screen .8; set lmargin at screen .2; 11 | set offset .08, .08, .08, .08 12 | set border lw 0.5 13 | 14 | set title "Rug Plot" font ",24" offset 0,.5 15 | 16 | set xtics out scale 3 17 | set ytics out scale 3 18 | plot $random every 15 using 1:2:xtic(""):ytic("") with points ps .5 19 | 20 | pause -1 "Hit to continue" 21 | reset 22 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/running_avg.dem: -------------------------------------------------------------------------------- 1 | # 2 | # This script demonstrates the use of assignment operators and 3 | # sequential expression evaluation to track data points as they 4 | # are read in. 5 | # 6 | # We use the '=' and ',' operators to track the running total 7 | # and previous 5 values of a stream of input data points. 8 | # 9 | # Ethan A Merritt - August 2007 10 | # 11 | # Define a function to calculate average over previous 5 points 12 | # 13 | set title \ 14 | "Demonstrate use of assignment and serial evaluation operators\n" \ 15 | . "to accumulate statistics as successive data lines are read in\n" 16 | set key invert box center right reverse Left 17 | set xtics nomirror 18 | set ytics nomirror 19 | set border 3 20 | 21 | samples(x) = $0 > 4 ? 5 : ($0+1) 22 | avg5(x) = (shift5(x), (back1+back2+back3+back4+back5)/samples($0)) 23 | shift5(x) = (back5 = back4, back4 = back3, back3 = back2, back2 = back1, back1 = x) 24 | 25 | # 26 | # Initialize a running sum 27 | # 28 | init(x) = (back1 = back2 = back3 = back4 = back5 = sum = 0) 29 | 30 | # 31 | # Plot data, running average and cumulative average 32 | # 33 | 34 | datafile = 'silver.dat' 35 | set xrange [0:57] 36 | 37 | set style data linespoints 38 | 39 | plot sum = init(0), \ 40 | datafile using 0:2 title 'data' lw 2 lc rgb 'forest-green', \ 41 | '' using 0:(avg5($2)) title "running mean over previous 5 points" pt 7 ps 0.5 lw 1 lc rgb "blue", \ 42 | '' using 0:(sum = sum + $2, sum/($0+1)) title "cumulative mean" pt 1 lw 1 lc rgb "dark-red" 43 | 44 | pause -1 "Hit return to continue" 45 | 46 | reset 47 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/scatter.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: scatter.dem,v 1.7 2003/10/28 05:35:54 sfeam Exp $ 3 | # 4 | # Simple demo of scatter data conversion to grid data. 5 | # 6 | 7 | set title "Simple demo of scatter data conversion to grid data" 8 | unset hidden3d 9 | set ticslevel 0.5 10 | set view 60,30 11 | set autoscale 12 | set parametric 13 | set style data points 14 | set xlabel "data style point - no dgrid" 15 | set key box 16 | splot "hemisphr.dat" 17 | pause -1 "Hit return to continue (1)" 18 | 19 | set dgrid3d 10,10,1 20 | set xlabel " data style lines, dgrid3d 10,10,1" 21 | set style data lines 22 | splot "hemisphr.dat" 23 | pause -1 "Hit return to continue (2)" 24 | 25 | set dgrid3d ,,4 26 | set xlabel " data style lines, dgrid3d ,,4 " 27 | set style data lines 28 | splot "hemisphr.dat" 29 | pause -1 "Hit return to continue (3)" 30 | 31 | set dgrid3d ,,16 32 | set xlabel " data style lines, dgrid3d ,,16" 33 | set style data lines 34 | splot "hemisphr.dat" 35 | pause -1 "Hit return to continue (4)" 36 | 37 | set contour 38 | set xlabel "data style lines, dgrid3d ,,16, contour" 39 | splot "hemisphr.dat" 40 | pause -1 "Hit return to continue (5)" 41 | 42 | unset dgrid3d 43 | set style data points 44 | set xlabel "data style points, nodgrid3d" 45 | splot "scatter2.dat" 46 | pause -1 "Hit return to continue (6)" 47 | 48 | set key nobox 49 | set dgrid3d ,,1 50 | set xlabel "data style lines, dgrid3d ,,1" 51 | set style data lines 52 | splot "scatter2.dat" 53 | pause -1 "Hit return to continue (7)" 54 | 55 | set dgrid3d ,,4 56 | set xlabel "data style lines, dgrid3d ,,4" 57 | set style data lines 58 | splot "scatter2.dat" 59 | pause -1 "Hit return to continue (8)" 60 | reset 61 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/simple.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: simple.dem,v 1.7 2012/11/18 23:12:22 sfeam Exp $ 3 | # 4 | # Requires data files "[123].dat" from this directory, 5 | # so change current working directory to this directory before running. 6 | # gnuplot> set term 7 | # gnuplot> load 'simple.dem' 8 | # 9 | set title "Simple Plots" font ",20" 10 | set key left box 11 | set samples 50 12 | set style data points 13 | 14 | plot [-10:10] sin(x),atan(x),cos(atan(x)) 15 | pause -1 "Hit return to continue" 16 | 17 | set key right nobox 18 | set samples 100 19 | plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) 20 | pause -1 "Hit return to continue" 21 | 22 | set key left box 23 | set samples 200 24 | plot [-3:5] asin(x),acos(x) 25 | pause -1 "Hit return to continue" 26 | 27 | plot [-30:20] besj0(x)*0.12e1 with impulses, (x**besj0(x))-2.5 with points 28 | pause -1 "Hit return to continue" 29 | 30 | set samples 400 31 | plot [-10:10] real(sin(x)**besj0(x)) 32 | pause -1 "Hit return to continue" 33 | 34 | set key bmargin center horizontal 35 | plot [-5*pi:5*pi] [-5:5] real(tan(x)/atan(x)), 1/x 36 | pause -1 "Hit return to continue" 37 | 38 | set key left box 39 | set autoscale 40 | set samples 800 41 | plot [-30:20] sin(x*20)*atan(x) 42 | pause -1 "Hit return to continue" 43 | 44 | plot [-19:19] '1.dat'with impulses ,'2.dat' ,'3.dat' with lines 45 | pause -1 "Hit return to continue" 46 | 47 | reset 48 | 49 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/singulr.dem: -------------------------------------------------------------------------------- 1 | # $Id: singulr.dem,v 1.6 2003/10/28 05:35:54 sfeam Exp $ 2 | # 3 | # Demo that plots some surfaces with singularities. 4 | # Author: Carsten Steger 5 | # 6 | # (x,y,x^2-y^2,2xy) is the graph of w=z^2 in 4-space. 7 | # Therefore (x^2-y^2,2xy,x,y) is the graph of w=sqrt(z) in 4-space. 8 | # Coordinates 1, 2, and 3 give the real part of either function, 9 | # whereas coordinates 1, 2, and 4 give the imaginary part. 10 | # The same holds for the cube function w=z^3. The graphs are given by 11 | # (x,y,x^3-3xy^2,3x^2y-y^3) and (x^3-3xy^2,3x^2y-y^3,x,y). 12 | # And so on... 13 | 14 | 15 | set parametric 16 | set hidden3d 17 | set isosamples 21 18 | set autoscale 19 | 20 | 21 | set view 60,30 22 | set urange [-3:3] 23 | set vrange [-3:3] 24 | set title "Real part of complex square root function" 25 | splot u**2-v**2,2*u*v,u 26 | pause -1 "Hit return to continue (1)" 27 | 28 | 29 | set view 60,210 30 | set title "Real part of complex square root function (different view)" 31 | replot 32 | pause -1 "Hit return to continue (2)" 33 | 34 | 35 | set view 60,120 36 | set urange [-3:3] 37 | set vrange [-3:3] 38 | set title "Imaginary part of complex square root function" 39 | splot u**2-v**2,2*u*v,v 40 | pause -1 "Hit return to continue (3)" 41 | 42 | 43 | set view 60,300 44 | set title "Imaginary part of complex square root function (different view)" 45 | replot 46 | pause -1 "Hit return to continue (4)" 47 | 48 | 49 | set view 60,30 50 | set urange [-3:3] 51 | set vrange [-3:3] 52 | set title "Real part of complex cube root function" 53 | splot u**3-3*u*v**2,3*u**2*v-v**3,u 54 | pause -1 "Hit return to continue (5)" 55 | 56 | 57 | set view 60,210 58 | set title "Real part of complex cube root function (different view)" 59 | replot 60 | pause -1 "Hit return to continue (6)" 61 | 62 | 63 | set view 60,30 64 | set urange [-3:3] 65 | set vrange [-3:3] 66 | set title "Imaginary part of complex cube root function" 67 | splot u**3-3*u*v**2,3*u**2*v-v**3,v 68 | pause -1 "Hit return to continue (7)" 69 | 70 | 71 | set view 60,210 72 | set title "Imaginary part of complex cube root function (different view)" 73 | replot 74 | pause -1 "Hit return to continue (8)" 75 | 76 | 77 | set view 60,30 78 | set isosamples 31 79 | set urange [-1:1] 80 | set vrange [-1:1] 81 | set title "Real part of complex 4th root function" 82 | splot u**4-6*u**2*v**2+v**4,4*u**3*v-4*u*v**3,u 83 | pause -1 "Hit return to continue (9)" 84 | 85 | 86 | set view 60,210 87 | set title "Real part of complex 4th root function (different view)" 88 | replot 89 | pause -1 "Hit return to continue (10)" 90 | 91 | 92 | set view 60,120 93 | set urange [-1:1] 94 | set vrange [-1:1] 95 | set title "Imaginary part of complex 4th root function" 96 | splot u**4-6*u**2*v**2+v**4,4*u**3*v-4*u*v**3,v 97 | pause -1 "Hit return to continue (11)" 98 | 99 | 100 | set view 60,300 101 | set title "Imaginary part of complex 4th root function (different view)" 102 | replot 103 | pause -1 "Hit return to continue (12)" 104 | 105 | 106 | set isosamples 21 107 | set view 60,20 108 | set urange [-3:3] 109 | set vrange [-3:3] 110 | set title "Enneper's surface" 111 | splot u-u**3/3+u*v**2,v-v**3/3+v*u**2,u**2-v**2 112 | pause -1 "Hit return to continue (13)" 113 | 114 | 115 | set view 60,110 116 | set title "Enneper's surface (different view)" 117 | replot 118 | pause -1 "Hit return to continue (14)" 119 | 120 | 121 | set isosamples 31,11 122 | set view 60,30 123 | set title "Moebius strip" 124 | set urange [0:2*pi] 125 | set vrange [-0.25:0.25] 126 | splot (2-v*sin(u/2))*sin(u),(2-v*sin(u/2))*cos(u),v*cos(u/2) 127 | pause -1 "Hit return to continue (15)" 128 | 129 | 130 | set view 60,210 131 | set title "Moebius strip (view from opposite side)" 132 | replot 133 | pause -1 "Hit return to continue (16)" 134 | 135 | unset key 136 | set xrange [-10:10] 137 | set yrange [-10:10] 138 | set zrange [-3:3] 139 | set urange [0:2*pi] 140 | set vrange [0:2*pi] 141 | set isosamples 39,60 142 | set view 60,120 143 | set title "Klein bottle" 144 | splot (2*sin(u)*cos(v/2)-sin(2*u)*sin(v/2)+8)*cos(v), \ 145 | (2*sin(u)*cos(v/2)-sin(2*u)*sin(v/2)+8)*sin(v), \ 146 | 2*sin(u)*sin(v/2)+sin(2*u)*cos(v/2) 147 | pause -1 "Hit return to continue (17)" 148 | 149 | 150 | set urange [0:2*pi] 151 | set vrange [0:4*pi/3] 152 | set isosamples 39,40 153 | set view 60,20 154 | set title "Klein bottle with look at the 'inside'" 155 | replot 156 | pause -1 "Hit return to continue (18)" 157 | 158 | set style data lines 159 | set xrange [-12:12] 160 | set yrange [-12:12] 161 | set zrange [*:*] 162 | unset hidden3d 163 | set ticslevel 0. 164 | set view 50,15 #HBB: ,1,1.7 165 | set title "Klein bottle, glassblowers' version (look-through)" 166 | splot "klein.dat" 167 | pause -1 "Hit return to continue (19)" 168 | 169 | 170 | set hidden3d 171 | set view 70,305 172 | set title "Klein bottle, glassblowers' version (solid)" 173 | splot "klein.dat" 174 | pause -1 "Hit return to continue (20)" 175 | 176 | reset 177 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/smooth.dem: -------------------------------------------------------------------------------- 1 | bin(x, s) = s*int(x/s) 2 | 3 | set zeroaxis 4 | set style data points 5 | 6 | # Uniform 7 | set title "Uniform Distribution" 8 | set key top right 9 | set boxwidth 0.05 10 | plot [-0.1:1.1][-0.4:1.5] "random-points" u 1:(0.25*rand(0)-.35) t '', \ 11 | "" u (bin($1,0.05)):(20/300.) smooth freq t 'smooth frequency' w boxes, \ 12 | "" u 1:(1/300.) smooth cumulative t 'smooth cumulative' 13 | pause -1 "Hit enter to continue" 14 | 15 | 16 | # Normal 17 | set title "Normal Distribution" 18 | set key top left 19 | set boxwidth 0.05 20 | plot "random-points" u 2:(0.25*rand(0)-.35) t '', \ 21 | "" u (bin($2,0.05)):(20/300.) smooth freq t 'smooth frequency' w boxes, \ 22 | "" u 2:(1/300.) smooth cumulative t 'smooth cumulative' 23 | pause -1 "Hit enter to continue" 24 | 25 | 26 | # Lognormal 27 | set title "Lognormal Distribution" 28 | set key top right 29 | set boxwidth 0.1 30 | plot [0:] "random-points" u 3:(0.25*rand(0)-.35) t '', \ 31 | "" u (bin($3,0.1)):(10/300.) smooth freq t 'smooth frequency' w boxes, \ 32 | "" u 3:(1/300.) smooth cumul t 'smooth cumulative' 33 | pause -1 "Hit enter to continue" 34 | 35 | 36 | # Mixed 37 | set title "Mixed Distribution (Lognormal with shifted Gaussian)" 38 | set key top right 39 | set boxwidth 0.1 40 | plot "random-points" u 4:(0.25*rand(0)-.35) t '', \ 41 | "" u (bin($4,0.1)):(10/300.) smooth freq t 'smooth frequency' w boxes, \ 42 | "" u 4:(1/300.) smooth cumul t 'smooth cumulative' 43 | pause -1 "Hit enter to continue" 44 | 45 | 46 | reset 47 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/sound.par: -------------------------------------------------------------------------------- 1 | # 2 | # Start parameters for the sound velocity fit 3 | # 4 | # HBB 970522: factored out 1e9 from c??, see hexa.fnc for details 5 | 6 | c33 = 9 7 | c11 = 6 8 | c44 = 1 9 | c13 = 4 10 | phi0 = 20.0 11 | 12 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/sound2.par: -------------------------------------------------------------------------------- 1 | # 2 | # Start parameters for the sound velocity fit 3 | # 4 | # HBB 970522: factored out 1e9 from c??, see hexa.fnc for details 5 | 6 | c33 = 9 7 | c11 = 6 8 | c44 = 1 # FIXED 9 | c13 = 4 # FIXED 10 | phi0 = 0.0001 11 | 12 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/spline.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: spline.dem,v 1.6 2004/09/28 06:06:10 sfeam Exp $ 3 | # 4 | # Some curve plotting using common cubic polynomial basis function for cagd. 5 | # 6 | # Gershon Elber, Aug. 1992 7 | # 8 | set xrang [0:1] 9 | set grid 10 | set key box 11 | 12 | set yrange[-0.2:1.4] 13 | m0(x) = 1 14 | m1(x) = x 15 | m2(x) = x**2 16 | m3(x) = x**3 17 | set title "The cubic Monomial basis functions" 18 | plot m0(x), m1(x), m2(x), m3(x) 19 | pause -1 "Press return to continue" 20 | 21 | h00(x) = x**2 * ( 2 * x - 3) + 1 22 | h01(x) = -x**2 * (2 * x - 3) 23 | h10(x) = x * (x - 1)**2 24 | h11(x) = x**2 * (x - 1) 25 | 26 | set title "The cubic Hermite basis functions" 27 | plot h00(x), h01(x), h10(x), h11(x) 28 | pause -1 "Press return to continue" 29 | 30 | bez0(x) = (1 - x)**3 31 | bez1(x) = 3 * (1 - x)**2 * x 32 | bez2(x) = 3 * (1 - x) * x**2 33 | bez3(x) = x**3 34 | set title "The cubic Bezier basis functions" 35 | plot bez0(x), bez1(x), bez2(x), bez3(x) 36 | pause -1 "Press return to continue" 37 | 38 | bsp0(x) = ( 1 - 3 * x + 3 * x**2 - x**3 ) / 6; 39 | bsp1(x) = ( 4 - 6 * x**2 + 3 * x**3 ) / 6; 40 | bsp2(x) = ( 1 + 3 * x + 3 * x**2 - 3 * x**3 ) / 6 41 | bsp3(x) = x**3 / 6 42 | set title "The cubic uniform Bspline basis functions" 43 | plot bsp0(x), bsp1(x), bsp2(x), bsp3(x) 44 | pause -1 "Press return to continue" 45 | 46 | y0 = 1 47 | y1 = 0.2 48 | y2 = 0.8 49 | y3 = 0 50 | 51 | x0 = 0 52 | x1 = 0.33 53 | x2 = 0.66 54 | x3 = 1 55 | 56 | xv0 = -0.3 57 | yv0 = 0.5 58 | xv1 = -0.4 59 | yv1 = 0.2 60 | 61 | set arrow from x0,y0 to x1,y1 nohead 62 | set arrow from x1,y1 to x2,y2 nohead 63 | set arrow from x2,y2 to x3,y3 nohead 64 | 65 | cub_bezier_x(t) = bez0(t) * x0 + bez1(t) * x1 + bez2(t) * x2 + bez3(t) * x3 66 | cub_bezier_y(t) = bez0(t) * y0 + bez1(t) * y1 + bez2(t) * y2 + bez3(t) * y3 67 | cub_bsplin_x(t) = bsp0(t) * x0 + bsp1(t) * x1 + bsp2(t) * x2 + bsp3(t) * x3 68 | cub_bsplin_y(t) = bsp0(t) * y0 + bsp1(t) * y1 + bsp2(t) * y2 + bsp3(t) * y3 69 | 70 | set parametric 71 | set trange [0:1] 72 | set title "The cubic Bezier/Bspline basis functions in use" 73 | plot cub_bezier_x(t), cub_bezier_y(t) with lines lt 2,\ 74 | cub_bsplin_x(t), cub_bsplin_y(t) with lines lt 3 75 | pause -1 "Press return to continue" 76 | 77 | unset arrow 78 | # 79 | # Note the arrows here, scaled by 1/3 so they will fit into plotting area 80 | # 81 | set arrow from x1,y1 to x1+xv0/3,y1+yv0/3 82 | set arrow from x2,y2 to x2+xv1/3,y2+yv1/3 83 | set arrow from x1,y1 to x1+xv0,y1+yv0 84 | set arrow from x2,y2 to x2+xv1,y2+yv1 85 | 86 | cub_hermit_x1(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0 + h11(t) * xv1 87 | cub_hermit_y1(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0 + h11(t) * yv1 88 | cub_hermit_x2(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0*3 + h11(t) * xv1*3 89 | cub_hermit_y2(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0*3 + h11(t) * yv1*3 90 | set title "The cubic Hermite basis functions in use" 91 | plot cub_hermit_x1(t), cub_hermit_y1(t) with lines lt 2,\ 92 | cub_hermit_x2(t), cub_hermit_y2(t) with lines lt 3 93 | pause -1 "Press return to continue" 94 | reset 95 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/start.par: -------------------------------------------------------------------------------- 1 | # 2 | # Start parameters for the fit of lcdemo.dat using density(x) 3 | # 4 | 5 | ml = -0.0005 6 | mh = -0.0005 7 | dens_Tc = 1.02 8 | Tc = 45.0 9 | g = 1.0 10 | b = 0.01002 11 | 12 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/stats.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Exercise the "stats" command. 3 | # Skip this demo cleanly if the stats option was not configured. 4 | # 5 | if (!strstrt(GPVAL_COMPILE_OPTIONS,"+STATS")) { 6 | print "No support for stats command" 7 | } else { 8 | 9 | set title "Use of stats command to find min/max/mean before plotting\nOne data column" 10 | 11 | set style data line 12 | set offset 0,0,.5,.5 13 | set autoscale fix 14 | set key left Left 15 | 16 | stats 'orbital_elements.dat' index 1 using 2 prefix "A" 17 | 18 | set arrow 1 from A_index_min, graph 0.1 to A_index_min, A_min fill 19 | set arrow 2 from A_index_max, graph 0.9 to A_index_max, A_max fill 20 | set label 1 at A_index_min, graph 0.1 "min" center offset 0,-1 21 | set label 2 at A_index_max, graph 0.9 "max" center offset 0,1 22 | 23 | plot 'orbital_elements.dat' index 1 using 0:2 title " Data" lw 2, \ 24 | A_mean title " Mean" 25 | 26 | pause -1 "Hit return to continue" 27 | 28 | set title "Use of stats command to find min/max/mean before plotting\nTwo data columns" 29 | 30 | f(x) = log(1+x) 31 | 32 | stats 'orbital_elements.dat' index 1 using (f($0)):2 prefix "B" 33 | 34 | set arrow 1 from B_pos_min_y, graph 0.1 to B_pos_min_y, B_min_y fill 35 | set arrow 2 from B_pos_max_y, graph 0.9 to B_pos_max_y, B_max_y fill 36 | set label 1 at B_pos_min_y, graph 0.1 "min" center offset 0,-1 37 | set label 2 at B_pos_max_y, graph 0.9 "max" center offset 0,1 38 | 39 | plot 'orbital_elements.dat' index 1 using (f($0)):2 title " Data" lw 2, \ 40 | B_mean_y title " Mean", \ 41 | B_slope * x + B_intercept title "Linear fit" 42 | 43 | pause -1 "Hit return to continue" 44 | 45 | } 46 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/steps.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: steps.dem,v 1.5 2003/10/17 15:02:21 mikulik Exp $ 3 | # 4 | # This file will serve as the datafile used in demonstrating the 5 | # "plot with steps" option. Here is a gnuplot input file 6 | # which uses "plot with steps", inverse error function, normal 7 | # distribution function, and the inverse normal distribution 8 | # function. 9 | 10 | set title "Compare steps, fsteps and histeps" 11 | plot [0:12][0:13] "steps.dat" notitle with points, \ 12 | "steps.dat" title 'steps' with steps, \ 13 | 'steps.dat' title 'fsteps' with fsteps, \ 14 | 'steps.dat' title 'histeps' with histeps 15 | 16 | pause -1 "Hit return for demonstration of automatic histogram creation" 17 | set title "Histogram built from unsorted data by 'smooth frequency'" 18 | set ylabel 'counts per bin' 19 | set xlabel 'bins' 20 | plot 'hemisphr.dat' u (floor($1*20)):(1) smooth frequency with histeps 21 | unset xlabel 22 | unset ylabel 23 | 24 | pause -1 "Hit return for normal distribution function." 25 | set title "Normal Distribution Function" 26 | plot [-3:3][0:1] norm(x) 27 | 28 | pause -1 "Hit return for inverse error function." 29 | set title "Inverse Error Function" 30 | plot [-1:1] inverf(x) 31 | 32 | pause -1 "Hit return for inverse normal distribution function." 33 | set title "Inverse Normal Distribution Function" 34 | plot [0:1] invnorm(x) 35 | 36 | pause -1 "Press return to continue" 37 | reset 38 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/stringvar.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Miscellaneous neat things you can do using the string variables code 3 | # 4 | set print "stringvar.tmp" 5 | print "" 6 | print "Exercise substring handling" 7 | print "" 8 | beg = 2 9 | end = 4 10 | print "beg = ",beg," end = ",end 11 | foo = "ABCDEF" 12 | print "foo = ",foo 13 | print "foo[3:5] = ",foo[3:5] 14 | print "foo[1:1] = ",foo[1:1] 15 | print "foo[5:3] = ",foo[5:3] 16 | print "foo[beg:end] = ",foo[beg:end] 17 | print "foo[end:beg] = ",foo[end:beg] 18 | print "foo[5:] = ",foo[5:] 19 | print "foo[5:*] = ",foo[5:*] 20 | print "foo[:] = ",foo[:] 21 | print "foo[*:*] = ",foo[*:*] 22 | print "foo.foo[2:2] = ",foo.foo[2:2] 23 | print "(foo.foo)[2:2]= ",(foo.foo)[2:2] 24 | print "" 25 | print "foo[1:1] eq 'A' && foo[2:2] ne 'X' = ", \ 26 | (foo[1:1] eq 'A' && foo[2:2] ne 'X') ? "true" : "false" 27 | 28 | unset print 29 | 30 | set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 31 | unset xtics 32 | unset ytics 33 | set yrange [0:1] 34 | plot 0 35 | 36 | pause -1 "Hit return to continue" 37 | 38 | 39 | set print "stringvar.tmp" 40 | print "Exercise string handling functions" 41 | print "" 42 | print "foo = ",foo 43 | print "strlen(foo) = ",strlen(foo) 44 | print "substr(foo,3,4) = ",substr(foo,3,4) 45 | print "" 46 | haystack = "`date`" 47 | needle = ":" 48 | S = strstrt(haystack,needle) 49 | print "haystack = \`date\`" 50 | print "haystack = ",haystack 51 | print "needle = ",needle 52 | print "S = strstrt(haystack,needle) = ",S 53 | print "haystack[S-2:S+2] = ",haystack[S-2:S+2] 54 | print "It is now " . haystack[S-2:S+2] 55 | # 56 | print "" 57 | print "words(haystack) = ",words(haystack) 58 | print "word(haystack,5) = ",word(haystack,5) 59 | # 60 | print "" 61 | # 62 | foo = sprintf("%40d %40d %40d %40d %40d %40d",1,2,3,4,5,6) 63 | if (strlen(foo) == 245) print "sprintf output of long strings works OK" 64 | if (strlen(foo) != 245) print "sprintf output of long strings BROKEN" 65 | print "" 66 | 67 | unset print 68 | set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 69 | unset xtics 70 | unset ytics 71 | set yrange [0:1] 72 | plot 0 73 | 74 | pause -1 "Hit return to continue" 75 | set print "stringvar.tmp" 76 | print "Exercise word and words functions" 77 | print "" 78 | foo = "word and words can handle 'quoted string'" 79 | print "foo = ",foo 80 | print "words(foo) = ",words(foo) 81 | print "word(foo, 6) = ",word(foo,6) 82 | print "" 83 | foo = "\"double quotes\" or 'single quotes'" 84 | print "foo = ",foo 85 | print "words(foo) = ",words(foo) 86 | print "" 87 | foo = "Apostrophes inside words don't matter" 88 | print "foo = ",foo 89 | print "word(foo, 4) = ",word(foo, 4) 90 | 91 | unset print 92 | set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 93 | unset xtics 94 | unset ytics 95 | set yrange [0:1] 96 | plot 0 97 | 98 | pause -1 "Hit return to continue" 99 | reset 100 | # 101 | set xrange [300:400] 102 | set title "String-valued expression in using spec" 103 | plot 'silver.dat' using 1:2 with linespoints notitle, \ 104 | '' using 1:2:(sprintf("[%.0f,%.0f]",$1,$2)) with labels 105 | # 106 | pause -1 "Hit return to continue" 107 | # 108 | set xrange [0:1] 109 | set yrange [0:1] 110 | set title "Constant string expressions as plot symbols" 111 | set xrange [250:500] 112 | set auto y 113 | set style data lines 114 | plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ 115 | '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \ 116 | '' u 1:2 lt -1 lw 0.5 notitle, \ 117 | '' u 1:($3+$1/50.) lt 3 lw 0.5 notitle, \ 118 | '' using 1:2:( ($2>($3+$1/50.)) ? "Up" : "Dn" ) with labels \ 119 | title 'plot using 1:2:( ($3>$2) ? "Up" : "Dn" ) with labels' 120 | # 121 | pause -1 "Hit return to continue" 122 | # 123 | reset 124 | set title "String-valued functions to generate datafile names" 125 | set key title 'file(i) = sprintf("%1d.dat",i); N=2; M=3' 126 | set key left width 25 Left reverse 127 | N = 2 128 | M = 3 129 | file(i) = sprintf("%1d.dat",i) 130 | plot 5*sin(x)/x, file(N), file(M) 131 | # 132 | pause -1 "Hit return to continue" 133 | # 134 | reset 135 | fmt = '%Y-%m-%d %H:%M:%S' 136 | time_str = '2005-05-09 19:44:12' 137 | seconds = strptime(fmt, time_str) 138 | time_str2 = strftime(fmt, seconds+10.) 139 | print '' 140 | print 'time_str = "', time_str, '"' 141 | print '-> seconds = ', seconds 142 | print ' seconds + 10. = ', seconds+10. 143 | print '-> time_str2 = "', time_str2, '"' 144 | # 145 | print "" 146 | # 147 | set xdata time 148 | set key inside left 149 | #set format x '%Y-%m-%d' 150 | fmt = "%d/%m/%y\t%H%M" 151 | print "read_time(fmt, c) =" \ 152 | . " strptime(fmt, stringcolumn(c).' '.stringcolumn(c+1))" 153 | read_time(fmt, c) = strptime(fmt, stringcolumn(c).' '.stringcolumn(c+1)) 154 | plot 'timedat.dat' skip 1 using (read_time(fmt,1)):3 with histeps, \ 155 | 'timedat.dat' skip 1 using (read_time(fmt,1)):($3-0.01):2 with labels title '' 156 | # 157 | print "" 158 | pause -1 "Hit return to continue" 159 | # 160 | reset 161 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/surface2.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: surface2.dem,v 1.4 1999/10/17 19:17:01 lhecking Exp $ 3 | # 4 | set parametric 5 | set isosamples 50,10 6 | set hidden 7 | set key below 8 | 9 | set title "Parametric Sphere" 10 | set urange [-pi/2:pi/2] 11 | set vrange [0:2*pi] 12 | set ztics nomirror -1.0,0.25,1.0 13 | set view 45,50 14 | splot cos(u)*cos(v),cos(u)*sin(v),sin(u) 15 | pause -1 "Hit return to continue (1)" 16 | 17 | set view ,,,0.7 18 | set title "Parametric Sphere, crunched z axis" 19 | replot 20 | pause -1 "Hit return to continue (2)" 21 | 22 | set view ,,,1.4 23 | set title "Parametric Sphere, enlarged z axis" 24 | replot 25 | pause -1 "Hit return to continue (3)" 26 | 27 | set view ,,,1.0 28 | 29 | set title "Parametric Torus" 30 | set urange [0:2*pi] 31 | set vrange [0:2*pi] 32 | set zrange [-1:1] # imitate old 'set view' hack 33 | splot (1-0.2*cos(v))*cos(u),(1-0.2*cos(v))*sin(u),0.2*sin(v) 34 | pause -1 "Hit return to continue (4)" 35 | 36 | 37 | set title "Parametric Hexagon" 38 | set urange [-1.3:1.3] 39 | set vrange [0:2*pi] 40 | set autoscale z 41 | set ticslevel 0. # reserve more space z direction. 42 | set view ,,0.7,1.4 # crunch xyz, and re-extend z back to full size 43 | set ztics autofreq 44 | splot cos(v)**3*cos(u)**3,sin(v)**3*cos(u)**3,sin(u)**3 45 | pause -1 "Hit return to continue (5)" 46 | 47 | set view ,,1.,1. 48 | 49 | set title "Parametric Helix" 50 | set isosamples 100,20 51 | set urange [0:10*pi] 52 | set vrange [0:2*pi] 53 | set autoscale z 54 | splot (1-0.1*cos(v))*cos(u),(1-0.1*cos(v))*sin(u),0.1*(sin(v)+u/1.7-10) 55 | pause -1 "Hit return to continue (6)" 56 | 57 | 58 | set title "Parametric Shell (clipped to limited z range)" 59 | set isosamples 40,20 60 | set view 50,30,1.0 61 | set urange [0:2*pi] 62 | set vrange [0:2*pi] 63 | set zrange [-3:1.5] 64 | splot cos(u)*u*(1+cos(v)/2),sin(v)*u/2,sin(u)*u*(1+cos(v)/2) 65 | pause -1 "Hit return to continue (7)" 66 | 67 | set autoscale z 68 | set title "Parametric Shell (automatic z range)" 69 | replot 70 | pause -1 "Hit return to continue (8)" 71 | 72 | set title "Interlocking Tori" 73 | 74 | set urange [-pi:pi] 75 | set vrange [-pi:pi] 76 | set isosamples 50,20 77 | splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines, \ 78 | 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines 79 | pause -1 "Hit return to continue (9)" 80 | reset 81 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/textcolor.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: textcolor.dem,v 1.2 2003/10/17 15:02:21 mikulik Exp $ 3 | # 4 | # Textcolor in 2D 5 | # 6 | reset 7 | # 8 | set title "Textcolor options in 2D plot (notice this title in color)" tc lt 1 9 | set xrange [-2:2] 10 | set yrange [-2:2] 11 | # 12 | set label 11 "label with textcolor lt 1" at -1.5, 1.8 front nopoint tc lt 1 13 | set label 10 "label with tc default" at -1.5, 1.6 front nopoint tc def 14 | set label 12 "label with tc lt 2" at -1.5, 1.4 front nopoint tc lt 2 15 | set label 13 "label with tc lt 3" at -1.5, 1.2 front nopoint tc lt 3 16 | # 17 | set xlabel 'color of xlabel should be lt 4' tc lt 4 18 | set ylabel 'color of ylabel should still be black' 19 | # 20 | plot sin(x) 21 | # 22 | pause -1 "Hit return to continue" 23 | # 24 | # Textcolor in 3D (req. pm3d) 25 | # 26 | set title "Textcolor options in splot (notice this title in color)" tc lt 1 27 | set samples 20; set isosamples 20 28 | set autoscale 29 | set key box 30 | set pm3d at s 31 | set colorbox horiz user origin .1,.12 size .8,.015 32 | set view 58, 64, 0.83 33 | set xrange [-10:10] 34 | set yrange [-10:10] 35 | set zrange [-10:10] 36 | # 37 | # Test labels 38 | # 39 | set label 1 "textcolor palette z" at 12,-10,-10 nopoint tc pal z 40 | set label 3 "tc pal z" at 12, -6, -6 nopoint tc pal z 41 | set label 4 "tc pal z" at 12, -3, -3 nopoint tc pal z 42 | set label 5 "tc pal z" at 12, -0, 0 nopoint tc pal z 43 | set label 6 "tc pal z" at 12, 3, 3 nopoint tc pal z 44 | set label 7 "tc pal z" at 12, 6, 6 nopoint tc pal z 45 | set label 8 "tc pal z" at 12, 9, 9 nopoint tc pal z 46 | # 47 | set xlabel 'xlabel should be lt 4' tc lt 4 48 | set cblabel 'color cblabel' textcolor lt 3 49 | # 50 | set label 10 "textcolor lt 1" at -10,-8,24 front nopoint tc lt 1 51 | set label 11 "tc lt 2" at -10,-8,21 front nopoint tc lt 2 52 | set label 12 "tc lt 3" at -10,-8,18 front nopoint tc lt 3 53 | set label 13 "textcolor default" at -10,-8,15 front nopoint tc def 54 | set label 14 "textcolor cb 5" at -10,-8,12 front nopoint tc pal cb 5 55 | set label 15 "tc cb 0" at -10,-8,9 front nopoint tc pal cb 0 56 | set label 16 "tc cb -5" at -10,-8,6 front nopoint tc pal cb -5 57 | set label 17 "textcolor frac .75" at -10,-8,3 nopoint tc pal frac .75 58 | set label 18 "tc frac .25" at -10,-8,0 nopoint tc pal frac .25 59 | # 60 | set ylabel 'ylabel should still be black' 61 | #set zlabel 'zlabel should have yet another color' tc lt 2 62 | # 63 | splot y 64 | # 65 | pause -1 "Hit return to continue" 66 | # 67 | 68 | reset 69 | 70 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/textrotate.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: textrotate.dem,v 1.2 2003/10/17 15:02:21 mikulik Exp $ 3 | # 4 | # Demonstrate rotation of label text 5 | # 6 | reset 7 | # 8 | set title "Rotation of label text" 9 | # 10 | set xrange [-5:5] 11 | set yrange [-5:5] 12 | set xlabel "xlabel" 13 | set ylabel "ylabel" 14 | # 15 | set label 1 "Default" at -4,4 16 | # 17 | set label 2 "rotate left" at 0,0 rotate left 18 | set label 3 "rotate right" at 0.5,0 rotate right 19 | set label 4 "rotate center" at 1.0,0 rotate center 20 | # 21 | set label 12 "rotate by -90 left" at 2.0,0 rotate by -90 left 22 | set label 13 "rotate by -90 right" at 2.5,0 rotate by -90 right 23 | set label 14 "rotate by -90 center" at 3.0,0 rotate by -90 center 24 | # 25 | set label 21 " rotate by 45" at -3.0,0.0 rotate by 45 point ps 2 26 | set label 22 " rotate by 90" at -3.0,0.0 rotate by 90 point ps 2 27 | set label 23 " rotate by -30" at -3.0,0.0 rotate by -30 point ps 2 28 | set label 24 " rotate by -60" at -3.0,0.0 rotate by -60 point ps 2 29 | set label 25 " rotate by -90" at -3.0,0.0 rotate by -90 point ps 2 30 | # 31 | plot 0 32 | # 33 | pause -1 "Hit return to continue" 34 | 35 | reset 36 | 37 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/tics.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: tics.dem,v 1.1 2005/08/05 15:53:23 mikulik Exp $ 3 | # 4 | # demo for tics settings 5 | 6 | set xlabel "x" 7 | set ylabel "y" 8 | set mxtics 9 | 10 | set title "Default tics settings" 11 | set xrange [-15:15] 12 | set yrange [-0.25:1] 13 | plot sin(sqrt(x**2))/sqrt(x**2) notitle 14 | pause -1 "Hit return to continue" 15 | 16 | set title "Different modification of tics settings" 17 | set tics scale 3,2 rotate by 45 18 | set xtics out offset 0,-1.0 19 | replot 20 | pause -1 "Hit return to continue" 21 | 22 | set xtics textcolor rgb "red" norotate 23 | set ytics rotate by 90 offset 2,0 24 | replot 25 | pause -1 "Hit return to continue" 26 | 27 | set title "Modification of tics settings (pm3d map with colorbar)" 28 | set pm3d map 29 | set border 4095 30 | set samples 25 31 | set isosamples 20 32 | set palette color positive 33 | set samples 50; set isosamples 50 34 | set tics norotate nooffset 35 | set cbtics in scale 4 36 | set xrange [-15:15] 37 | set yrange [-15:15] 38 | set zrange [-0.25:1] 39 | splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2) notitle 40 | pause -1 "Hit return to continue" 41 | 42 | reset 43 | 44 | print "End of tics demo." 45 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/timedat.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: timedat.dem,v 1.11.2.2 2015/10/23 21:23:51 sfeam Exp $ 3 | # 4 | 5 | set title "Fsteps plot\nwith date and time as x-values" 6 | set style data fsteps 7 | set xlabel "Date\nTime" 8 | set timefmt "%d/%m/%y\t%H%M" 9 | set yrange [ 0 : ] 10 | set xdata time 11 | set xrange [ "1/6/93":"1/11/93" ] 12 | set ylabel "Concentration\nmg/l" 13 | set format x "%d/%m\n%H:%M" 14 | set grid 15 | set key left 16 | plot 'timedat.dat' using 1:3 t '', \ 17 | 'timedat.dat' using 1:3 t 'Total P' with points, \ 18 | 'timedat.dat' using 1:4 t '', \ 19 | 'timedat.dat' using 1:4 t 'PO4' with points 20 | pause -1 "Hit return to continue" 21 | 22 | reset 23 | 24 | set title "Time data on Y, millisecond precision" font ",14" 25 | set ydata time 26 | set timefmt "%s" 27 | set offset 0.5,1.5,.2,.2 28 | unset key 29 | 30 | fulltime(col) = strftime("%d %b %Y\n%H:%M:%.3S",column(col)) 31 | parttime(col) = strftime("%H:%M:%.3S",column(col)) 32 | 33 | plot '-' using 0:1:(fulltime(1)):xticlabels(2):yticlabels(parttime(1)) \ 34 | with labels point pt 7 left offset 1,1 font ",7" 35 | 1390852607.1 A 36 | 1390852607.2 B 37 | 1390852607.4 C 38 | 1390852607.8 D 39 | 1390852608.4 E 40 | 1390852610.001 F 41 | e 42 | 43 | pause -1 "Hit return to continue" 44 | 45 | reset 46 | set title "Date format (top) vs Time format (bottom)" font "/:Bold,14" 47 | set xrange [-7000:3000] 48 | set link x2 49 | set tics font ",8" 50 | set x2tics format "%D\n%R" time offset 0,-1 51 | set xtics format "%tH:%tM:%tS" time 52 | set xlabel 'set xtics format "%tH:%tM:%.2tS"' 53 | set arrow 1 from 0, graph 0 to 0, graph 1 heads filled 54 | 55 | set yzeroaxis 56 | unset ytics 57 | set bmargin at screen .55 58 | set tmargin at screen .6 59 | 60 | plot x notitle 61 | 62 | pause -1 "Hit return to continue" 63 | 64 | reset 65 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/transparent.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Example of transparent fill areas 3 | # Ethan A Merritt - Aug 2006 4 | # NB: 5 | # Not all terminal types support transparency 6 | # Assumes UTF-8 support for plot titles 7 | # 8 | save_encoding = GPVAL_ENCODING 9 | set encoding utf8 10 | set style fill solid 1.0 noborder 11 | set style function filledcurves y1=0 12 | set clip two 13 | 14 | Gauss(x,mu,sigma) = 1./(sigma*sqrt(2*pi)) * exp( -(x-mu)**2 / (2*sigma**2) ) 15 | d1(x) = Gauss(x, 0.5, 0.5) 16 | d2(x) = Gauss(x, 2., 1.) 17 | d3(x) = Gauss(x, -1., 2.) 18 | 19 | set xrange [-5:5] 20 | set yrange [0:1] 21 | 22 | unset colorbox 23 | 24 | set key title "Gaussian Distribution" 25 | set key top left Left reverse samplen 1 26 | 27 | #set obj 1 rect from graph 0,0 to graph 1,1 28 | #set obj 1 rect back fs solid 0.25 fc lt 4 29 | 30 | set title "Solid filled curves" 31 | plot d1(x) fs solid 1.0 lc rgb "forest-green" title "μ = 0.5 σ = 0.5", \ 32 | d2(x) lc rgb "gold" title "μ = 2.0 σ = 1.0", \ 33 | d3(x) lc rgb "dark-violet" title "μ = -1.0 σ = 2.0" 34 | 35 | pause -1 "Hit return to continue" 36 | 37 | set style fill transparent solid 0.5 noborder 38 | set title "Transparent filled curves" 39 | replot 40 | 41 | pause -1 "Hit return to continue" 42 | 43 | set style fill pattern 4 bo 44 | set title "Pattern-filled curves" 45 | replot 46 | 47 | pause -1 "Hit return to continue" 48 | 49 | set style fill transparent pattern 4 bo 50 | set title "Transparent pattern-filled curves" 51 | replot 52 | 53 | pause -1 "Hit return to continue" 54 | set encoding save_encoding 55 | reset 56 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/transparent_solids.dem: -------------------------------------------------------------------------------- 1 | set title "Interlocking Tori - PM3D surface with depth sorting and transparency" 2 | 3 | unset border 4 | unset key 5 | set object 1 rect from screen 0, 0, 0 to screen 1, 1, 0 behind 6 | set object 1 rect fc rgb "gray" fillstyle solid 1.0 border -1 7 | set view 64, 345, 1.24375, 0.995902 8 | set isosamples 50, 20 9 | unset xtics 10 | unset ytics 11 | unset ztics 12 | set parametric 13 | set dummy u,v 14 | set urange [ -pi : pi ] 15 | set vrange [ -pi : pi ] 16 | 17 | set palette rgbformulae 8, 9, 7 18 | set style fill transparent solid 0.30 border 19 | set pm3d depthorder border linecolor rgb "#a0a0f0" linewidth 0.5 20 | 21 | splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with pm3d, \ 22 | 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with pm3d 23 | 24 | pause -1 "Hit return to continue" 25 | 26 | unset title 27 | set label 1 "Kuen's Surface" at screen 0.57, 0.9 28 | set label 1 font "frscript,20" 29 | set pm3d depthorder border linetype -1 linewidth 0.5 30 | set style fill transparent solid 0.65 border 31 | set palette 32 | set hidden3d 33 | 34 | set ticslevel 0 35 | unset xtics ; unset ytics ; unset ztics 36 | unset border ; unset colorbox ; unset key 37 | set lmargin at screen 0.1 38 | set bmargin at screen 0.1 39 | set rmargin at screen 0.9 40 | set tmargin at screen 0.9 41 | 42 | set parametric 43 | set dummy u,v 44 | set urange [-4.5:4.5] 45 | set vrange [0.05:pi-0.05] 46 | set isosamples 51,51 47 | set view 122, 357, 1.35, 1.08 48 | 49 | a = 1.0 50 | 51 | x(u,v) = 2.*a*(cos(u)+u*sin(u))*sin(v) / (1+u**2.*(sin(v))**2) 52 | y(u,v) = 2.*a*(sin(u)-u*cos(u))*sin(v) / (1+u**2.*(sin(v))**2) 53 | z(u,v) = a*log(tan(v/2.))+2.*cos(v)/(1+u**2.*(sin(v))**2) 54 | 55 | splot x(u,v), y(u,v), z(u,v) with pm3d 56 | 57 | pause -1 "Hit return to continue" 58 | reset 59 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/using.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: using.dem,v 1.6 2003/10/28 05:35:54 sfeam Exp $ 3 | # 4 | # Requires data file "using.dat" from this directory, 5 | # so change current working directory to this directory before running. 6 | # 7 | 8 | set title "Convex November 1-7 1989 Circadian" 9 | set key left box 10 | set xrange[-1:24] 11 | plot 'using.dat' using 2:4 title "Logged in" with impulses,\ 12 | 'using.dat' using 2:4 title "Logged in" with points 13 | pause -1 "Hit return to continue" 14 | 15 | set xrange [1:8] 16 | #set xdtic 17 | set title "Convex November 1-7 1989" 18 | set key below 19 | set label "(Weekend)" at 5,25 center 20 | plot 'using.dat' using 3:4 title "Logged in" with impulses,\ 21 | 'using.dat' using 3:5 t "Load average" with points,\ 22 | 'using.dat' using 3:6 t "%CPU used" with lines 23 | unset label 24 | pause -1 "Hit return to continue" 25 | reset 26 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/utf8.dem: -------------------------------------------------------------------------------- 1 | # Ethan A Merritt - April 2006 2 | # 3 | # Test/Demonstration of UTF-8 support by gnuplot terminals. 4 | # 5 | # First we dump all 7-bit characters by octal code value, then display a 6 | # selection of 8-bit unicode (UTF-8) characters from various code points. 7 | # 8 | # This will only produce reasonable output if the current gnuplot 9 | # terminal supports multi-byte ("wide") characters and the current 10 | # font contains the corresponding UTF-8 encoded characters maps. 11 | # 12 | # Some possible terminal + font selections are: 13 | # 14 | # set term x11 font "mbfont:sazanami mincho,vera,20" 15 | # set term png font "/usr/share/fonts/ttf/arialuni.ttf" 13 16 | # set term wxt 17 | # 18 | # 19 | save_encoding = GPVAL_ENCODING 20 | set encoding utf8 21 | # 22 | set label 100 at screen 0.5, 0.95 center 23 | set label 100 "Dump all 7-bit characters and a selection of UTF-8 unicode characters\nCharacters that are missing from your current font will not appear in the output below\nOnly a portion of the characters on a unicode page are dumped" 24 | # 25 | set border 0 26 | unset xtics 27 | unset ytics 28 | # 29 | set label 101 "page 0 (Latin1)" at screen 0.05, 0.80 30 | set label 102 "0020-0040:" at screen 0.05, 0.75 31 | set label 103 "0041-0060:" at screen 0.05, 0.70 32 | set label 104 "0061-007E:" at screen 0.05, 0.65 33 | set label 105 "" at screen 0.05, 0.60 34 | set label 106 "page 1:" at screen 0.05, 0.50 35 | set label 107 "page 3:" at screen 0.05, 0.45 36 | set label 108 "page 4:" at screen 0.05, 0.40 37 | set label 109 "pages 33,34:" at screen 0.05, 0.35 38 | set label 110 "pages 37,38:" at screen 0.05, 0.30 39 | set label 111 "Japanese:" at screen 0.05, 0.25 40 | set label 112 "Hebrew:" at screen 0.05, 0.20 41 | # 42 | set label 1 at screen 0.2, 0.80 43 | set label 2 at screen 0.2, 0.75 44 | set label 3 at screen 0.2, 0.70 45 | set label 4 at screen 0.2, 0.65 46 | set label 5 at screen 0.2, 0.60 47 | set label 6 at screen 0.2, 0.50 48 | set label 7 at screen 0.2, 0.45 49 | set label 8 at screen 0.2, 0.40 50 | set label 9 at screen 0.2, 0.35 51 | set label 10 at screen 0.2, 0.30 52 | set label 11 at screen 0.2, 0.25 53 | set label 12 at screen 0.2, 0.20 54 | # 55 | #set label 1 "\001\002\003\004\005\006\007\010\011 \013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040" 56 | set label 2 "\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100" 57 | set label 3 "\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140" 58 | set label 4 "\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177" 59 | 60 | set label 5 "¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿" . "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑñòóôõö÷øùúûüýþÿ" 61 | set label 6 "ĀāĂ㥹ĆćĈĉĊċČ茜ŜŝŞşŠšŴŵŶŷŸŹźŻżŽž" 62 | set label 7 "αβγδεζηθικλμνξοπρςστυφχψωϑϖ" 63 | set label 8 "абвгдежзийклмнопрстуфхцчшщъыьэюяѐёђѓєѕіїјљњћќѝўџ" 64 | set label 9 "ℎℏℋℓℛÅ∀∂∃∇∈∋√∞∧∨∩∪∫⊂⊃⊆⊇⊥⊗⊙" 65 | set label 10 "◎▲△▼▽☉☿♀♁♂♃♄♅♆♇♈♉♊♋♌♍♎♏♐♑" 66 | set label 11 "日本語フォント かな 漢字" 67 | set label 12 "אבגדהוזחטיךכלםמןנסעףפץצקרשת" 68 | # 69 | set xrange [-1:1] 70 | set yrange [-1:1] 71 | plot -10 notitle 72 | 73 | pause -1 "Hit return to continue" 74 | set encoding save_encoding 75 | reset 76 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/varcolor.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Demo/test of variable color in many different plot styles 3 | # 4 | set boxwidth 0.2 abs 5 | set bars front 6 | by3(x) = (((int(x)%3)+1)/6.) 7 | by4(x) = (((int(x)%4)+1)/7.) 8 | rgbfudge(x) = x*51*32768 + (11-x)*51*128 + int(abs(5.5-x)*510/9.) 9 | 10 | set yrange [-4:10] 11 | set xrange [0:11] 12 | unset key #below 13 | 14 | set title "variable color points, circles, candlesticks, boxes, and boxxyerror" 15 | plot 'candlesticks.dat' using 1:(1):1 with points pt 11 lc variable, \ 16 | '' using 1:2:(.1):1 with circles lc variable, \ 17 | '' using 1:3:2:6:5:1 with candlesticks lc variable, \ 18 | '' using ($1+.3):3:2:6:5:1 with financebars lc variable, \ 19 | '' using 1:(8):(by3($0)):(by4($0)):1 with boxxy lc var fs solid, \ 20 | '' using 1:(-$2/2):1 with boxes lc var 21 | 22 | pause -1 'Hit to continue' 23 | 24 | set title "variable color boxerror, xyerrorbars, impulses, vectors, and labels" 25 | unset colorbox 26 | plot 'candlesticks.dat' \ 27 | using 1:5:2:6:(.2):1 with boxerror lc var fs solid 0.5 border -1 , \ 28 | '' using 1:(1):1 with points pt 11 lc variable, \ 29 | '' using 1:(8):(by3($0)):(by4($0)):1 with xyerrorbars lc var, \ 30 | '' using ($1+.5):($2/2):1 with impulses lc var lw 3,\ 31 | '' using 1:(-3):(0.5):(1):1 with vectors lc var,\ 32 | '' using 1:(-1):1:1 with labels tc variable 33 | 34 | pause -1 'Hit to continue' 35 | 36 | set title "variable color using 'lc palette z'" 37 | set colorbox 38 | plot 'candlesticks.dat' using 1:(1):1 with points pt 11 lc pal z, \ 39 | '' using 1:2:(.1):1 with circles lc pal z, \ 40 | '' using 1:3:2:6:5:1 with candlesticks lc pal z, \ 41 | '' using ($1+.3):3:2:6:5:1 with financebars lc pal z, \ 42 | '' using 1:(8):(by3($0)):(by4($0)):1 with boxxy lc pal z fs solid, \ 43 | '' using 1:(-$2/2):1 with boxes lc pal z 44 | 45 | pause -1 'Hit to continue' 46 | 47 | plot 'candlesticks.dat' \ 48 | using 1:5:2:6:(.2):1 with boxerror lc pal z fs solid 0.5, \ 49 | '' using 1:(1):1 with points pt 11 lc pal z, \ 50 | '' using 1:(8):(by3($0)):(by4($0)):1 with xyerrorbars lc pal z, \ 51 | '' using ($1+.5):($2/2):1 with impulses lc pal z lw 3,\ 52 | '' using 1:(-3):(0.5):(1):1 with vectors lc pal z,\ 53 | '' using 1:(-1):1:1 with labels tc pal z 54 | 55 | 56 | pause -1 'Hit to continue' 57 | 58 | set title "variable color using 'lc rgb variable'" 59 | plot 'candlesticks.dat' using 1:(1):(rgbfudge($1)) with points pt 11 lc rgb var, \ 60 | '' using 1:2:(.1):(rgbfudge($1)) with circles lc rgb var, \ 61 | '' using 1:3:2:6:5:(rgbfudge($1)) with candlesticks lc rgb var, \ 62 | '' using ($1+.3):3:2:6:5:(rgbfudge($1)) with financebars lc rgb var, \ 63 | '' using 1:(8):(by3($0)):(by4($0)):(rgbfudge($1)) with boxxy lc rgb var fs solid, \ 64 | '' using 1:(-$2/2):(rgbfudge($1)) with boxes lc rgb var 65 | 66 | pause -1 'Hit to continue' 67 | 68 | plot 'candlesticks.dat' \ 69 | using 1:5:2:6:(.2):(rgbfudge($1)) with boxerror lc rgb var fs solid 0.5 noborder, \ 70 | '' using 1:(1):(rgbfudge($1)) with points pt 11 lc rgb var, \ 71 | '' using 1:(8):(by3($0)):(by4($0)):(rgbfudge($1)) with xyerrorbars lc rgb var, \ 72 | '' using ($1+.5):($2/2):(rgbfudge($1)) with impulses lc rgb var lw 3,\ 73 | '' using 1:(-3):(0.5):(1):(rgbfudge($1)) with vectors lc rgb var,\ 74 | '' using 1:(-1):1:(rgbfudge($1)) with labels tc rgb var point 75 | 76 | pause -1 'Hit to continue' 77 | reset 78 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/vector.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: vector.dem,v 1.13 2014/04/05 06:17:08 markisch Exp $ 3 | # 4 | # This file demonstrates 5 | # -1- saving contour lines as a gnuplottable datablock 6 | # -2- plotting a vector field on the same graph 7 | # -3- manipulating columns using the '$1,$2' syntax. 8 | # the example is taken here from Physics is the display of equipotential 9 | # lines and electrostatic field for a dipole (+q,-q) 10 | 11 | print "\n This file demonstrates" 12 | print " -1- saving contour lines as a gnuplottable datablock" 13 | print " -2- plotting a vector field on the same graph" 14 | print " -3- manipulating columns using the '$1,$2' syntax." 15 | print " the example is taken here from Physics is the display of equipotential" 16 | print " lines and electrostatic field for a dipole (+q,-q)" 17 | # 18 | r(x,y)=sqrt(x*x+y*y) 19 | v1(x,y)= q1/(r((x-x0),y)) 20 | v2(x,y)= q2/(r((x+x0),y)) 21 | # 22 | vtot(x,y)=v1(x,y)+v2(x,y) 23 | # 24 | e1x(x,y)= q1*(x-x0)/r(x-x0,y)**3 25 | e1y(x,y)= q1*(y)/r(x-x0,y)**3 26 | e2x(x,y)= q2*(x+x0)/r(x+x0,y)**3 27 | e2y(x,y)= q2*(y)/r(x+x0,y)**3 28 | etotx(x,y)=e1x(x,y)+e2x(x,y) 29 | etoty(x,y)=e1y(x,y)+e2y(x,y) 30 | enorm(x,y)=sqrt(etotx(x,y)*etotx(x,y)+etoty(x,y)*etoty(x,y)) 31 | dx1(x,y)=coef*etotx(x,y)/enorm(x,y) 32 | dy1(x,y)=coef*etoty(x,y)/enorm(x,y) 33 | dx2(x,y)=coef*etotx(x,y) 34 | dy2(x,y)=coef*etoty(x,y) 35 | # 36 | coef=.7 37 | x0=1. 38 | q1=1 39 | q2=-1 40 | xmin=-10. 41 | xmax=10. 42 | ymin=-10. 43 | ymax=10. 44 | # 45 | reset 46 | unset autoscale 47 | set xr [xmin:xmax] 48 | set yr [ymin:ymax] 49 | set isosam 31,31 50 | #set view 0, 0, 1, 1 51 | set view map 52 | unset surface 53 | set contour base 54 | set cntrparam order 4 55 | set cntrparam linear 56 | set cntrparam levels discrete -3,-2 ,-1 ,-0.5 ,-0.2 ,-0.1 ,-0.05 ,-0.02 ,0 ,0.02 ,0.05 ,0.1 ,0.2 ,0.5 ,1 ,2 ,3 57 | set cntrparam points 5 58 | # 59 | set label "-q" at -1,0 center 60 | set label "+q" at 1,0 center 61 | splot vtot(x,y) w l 62 | print "Now create a in-memory datablock with equipotential lines" 63 | pause -1 "Hit return to continue" 64 | 65 | set table $equipo2 66 | replot 67 | unset table 68 | reset 69 | pause 0 70 | 71 | plot $equipo2 w l 72 | print "Now create a x/y datablock for plotting with vectors " 73 | print "and display vectors parallel to the electrostatic field" 74 | pause -1 "Hit return to continue" 75 | set isosam 31,31 76 | 77 | set table $field2xy 78 | splot vtot(x,y) w l 79 | unset table 80 | pause 0 81 | 82 | unset autoscale 83 | set xr [xmin:xmax] 84 | set yr [ymin:ymax] 85 | set isosam 31,31 86 | set key under Left reverse 87 | plot $field2xy u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \ 88 | $equipo2 w l 89 | pause -1 "Hit return to continue" 90 | 91 | reset 92 | 93 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/world.dem: -------------------------------------------------------------------------------- 1 | # 2 | # $Id: world.dem,v 1.10.2.1 2014/11/08 04:52:24 sfeam Exp $ 3 | # 4 | # 5 | set title "Gnuplot Correspondences\ngeographic coordinate system" 6 | unset key 7 | set xrange [-180:180] 8 | set yrange [-90:90] 9 | set yzeroaxis 10 | set xtics geographic 11 | set ytics geographic 12 | set format x "%D %E" 13 | set format y "%D %N" 14 | # 15 | # plot world map and correspondent locations as a + 16 | plot 'world.dat' with lines lc rgb "blue" , 'world.cor' with points lt 1 pt 2 17 | pause -1 "Hit return to continue" 18 | # 19 | # plot a '3D version using spherical coordinate system' of the world. 20 | reset 21 | unset key 22 | set border 23 | set yzeroaxis 24 | set xtics 25 | set ytics 26 | set angles degrees 27 | set title "3D version using spherical coordinate system" 28 | set ticslevel 0 29 | set view 70,40,0.8,1.2 30 | set mapping spherical 31 | set parametric 32 | set samples 32 33 | set isosamples 9 34 | set urange [-90:90] 35 | set vrange [0:360] 36 | splot cos(u)*cos(v),cos(u)*sin(v),sin(u) with lines lc rgb "cyan" ,\ 37 | 'world.dat' with lines lc rgb "blue" , 'world.cor' with points lt 1 pt 2 38 | pause -1 "Hit return to continue" 39 | 40 | # HBB 20000715: new demo: 41 | # same plot, but with hidden3d active, plus axes through the 42 | # poles: 43 | set title "3D solid version with hidden line removal" 44 | set hidden3d offset 0 45 | set arrow from 0,0,-1.2 to 0,0,1.2 lc rgb "cyan" lw 2 46 | set arrow from -1.2, 0, 0 to 1.2, 0, 0 nohead lc rgb "cyan" lw 1 47 | set arrow from 0, -1.2, 0 to 0, 1.2, 0 nohead lc rgb "cyan" lw 1 48 | splot cos(u)*cos(v),-cos(u)*sin(v),sin(u) with lines lc rgb "cyan" ,\ 49 | 'world.dat' u 1:2:(1.001) with lines lc rgb "blue" , 'world.cor' with points lt 1 pt 2 50 | pause -1 "Hit return to continue" 51 | 52 | unset arrow 53 | 54 | # 55 | # plot a '3D version using cylindrical coordinate system' of the world. 56 | set title "3D version using cylindrical coordinate system" 57 | set ticslevel 0.0 58 | set view 70,40,0.8,1.2 59 | set mapping cylindrical 60 | set parametric 61 | set samples 32 62 | set isosamples 13 63 | set urange [-180:180] 64 | set vrange [-90:90] 65 | splot cos(u),sin(u),v with lines lc rgb "cyan" ,\ 66 | 'world.dat' with lines lc rgb "blue" lw 2, 'world.cor' with points lt 1 pt 2 67 | pause -1 "Hit return to continue" 68 | reset 69 | -------------------------------------------------------------------------------- /testdata/gnuplot-5.0.3/demo/world2.dem: -------------------------------------------------------------------------------- 1 | # 2 | # Plot of location on globe, 3 | # this time with labels color-coded by explicit 4th input column 4 | # Requires EAM_DATASTRINGS 5 | # 6 | set dummy u,v 7 | set angles degrees 8 | set parametric 9 | set view 60, 136, 1.22, 1.26 10 | set samples 64,64 11 | set isosamples 13,13 12 | set mapping spherical 13 | unset xtics 14 | unset ytics 15 | unset ztics 16 | set border 0 17 | set title "Labels colored by GeV plotted in spherical coordinate system" 18 | set urange [ -90.0000 : 90.0000 ] noreverse nowriteback 19 | set vrange [ 0.00000 : 360.000 ] noreverse nowriteback 20 | set cblabel "GeV" 21 | set cbrange [0:8] 22 | set colorb vert user size 0.02, 0.75 23 | unset hidden 24 | splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \ 25 | 'world.dat' notitle with lines lt 2, \ 26 | 'srl.dat' using 3:2:(1):1:4 with labels notitle point pt 6 lw .1 left offset 1,0 font "Helvetica,7" tc pal 27 | pause -1 "Same plot with hidden line removal" 28 | set title "Labels with hidden line removal" 29 | set hidden nooffset 30 | replot 31 | pause -1 "Hit return to continue" 32 | -------------------------------------------------------------------------------- /xerrors: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Plot Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | --------------------------------------------------------------------------------