-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGnuplotSimple.rex
More file actions
executable file
·53 lines (41 loc) · 998 Bytes
/
Copy pathGnuplotSimple.rex
File metadata and controls
executable file
·53 lines (41 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* Library: oorexx-gnuplot: gnuplot for ooRexx
* File: GnuplotSimple.rex
* Description: A minimal procedural API for Gnuplot in Open Object Rexx.
* Simple 2D/3D plotting routines for data series.
*
* Author: Salvador Parra Camacho
* Version: 0.1.1
* Date('S'): 20260831
* License: Apache 2.0
* Repository: https://github.com/sparrac/oorexx-gnuplot
*/
::requires 'Gnuplot'
::constant VERSION "0.1.1"
::constant LIBRARY "oorexx-gnuplot"
/**
* plot(x, y, [title])
*
* Plots a 2D data from arrays x and y.
*/
::routine plot public
use arg x, y, title = ''
gp = .Gnuplot~new
p = gp~add(x, y)
p~title = title
p~with = 'linespoints'
return gp~plot
/**
* splot(x, y, z, [title])
*
* Plots a 3D data from arrays x, y and z.
*
*/
::routine splot public
use arg x, y, z, title = ''
gp = .Gnuplot~new
p = gp~add(x, y, z)
p~title = title
p~using = '1:2:3'
p~with = 'linespoints'
return gp~splot