forked from OdonataResearchLLC/LispPlotter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-plotter.lisp
64 lines (54 loc) · 1.31 KB
/
test-plotter.lisp
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
54
55
56
57
58
59
60
61
62
63
(in-package "PLOTTER")
(capi:define-interface pw4 ()
()
(:panes
(p1 <plotter-pane>
:accessor p1)
(p2 <plotter-pane>
:accessor p2)
(p3 <plotter-pane>
:accessor p3)
(p4 <plotter-pane>
:accessor p4))
(:layouts
(default-layout
capi:grid-layout
'(p1 p2 p3 p4)
:columns 2))
(:default-initargs
:layout 'default-layout
:window-styles '(:internal-borderless))
)
(setf intf (capi:display
(make-instance 'pw4)))
(defun sinc (x)
(/ (sin x) x))
(clear (p1 intf))
(fplot (p1 intf) '(-20 20) #'sinc :thick 2 :color :darkgreen :title "Sinc")
(fplot (p4 intf) '(-20 0) #'sinc :thick 2 :color :orange :title "Sinc")
;; -------------------------------
(setf px (capi:contain
(make-instance '<plotter-pane>)))
(fplot px '(-20 0) #'sinc :thick 2 :color :orange :title "Sinc")
;; -------------------------------
(capi:define-interface pw4 ()
()
(:panes
(p1 <plotter-pane>
:accessor p1)
(p2 <plotter-pane>
:accessor p2)
(p3 <plotter-pane>
:accessor p3)
(p4 <plotter-pane>
:accessor p4))
(:layouts
(default-layout
capi:pinboard-layout
'(p1 p2 p3 p4)))
(:default-initargs
:layout 'default-layout
:window-styles '(:internal-borderless))
)
(setf intf (capi:display
(make-instance 'pw4)))