-
Notifications
You must be signed in to change notification settings - Fork 86
glgui lineplot
Matthias Görges edited this page May 11, 2015
·
1 revision
glgui-lineplot adds a line plot (or multiple line plots) to the screen.
Parameter | Description |
---|---|
g | The Graphical User Interface (GUI) this widget belongs to |
x | Lower left corner along the x-axis in pixels |
y | Lower left corner along the y-axis in pixels |
w | Width of the widget in pixels |
h | Height of the widget in pixels |
xval | List (or list of lists) of x-values to be plotted |
yval | List (or list of lists) of y-values to be plotted |
color | Dot color (or list of colors) |
axis | Optional: Axis limits '(xmin xmax ymin ymax) |
Example 1: Draw a simple line plot, in Red, as well as a lineplot with two lines, in Yellow and White, to the screen.
(let* ((w (glgui-width-get))
(h (glgui-height-get))
(dim (min (/ w 2) (/ h 2)))
(x (list 0 1 2 3 4 5 5 6 7 8))
(y (list 9 8 7 5 4 3 0 2 3 1))
)
(glgui-lineplot gui 0 0 300 300 x y Red)
(glgui-lineplot gui 300 0 300 300 (list x y) (list y x) (list Yellow White) (list -5 15 -5 15))
)
Besides the parameters set in the above procedure, the widget has the following attributes that can be set using glgui-widget-set! and retrieved using glgui-widget-get:
Attribute | Default Value | Description |
---|---|---|
axiscolor | (color-fade White 0.25) | Color of x and y axis, drawn if axis are set |
-
- accelerometer
- alist
- audio
- audioaux
- base64
- btle-scan
- camera
- cdb
- cgi
- config
- csv
- curl
- digest
- dmtx
- download
- eventloop
- fcgi
- fft
- generalized-arrays
- gps
- graph
- gyro
- hidapi
- hpdf
- html
- httpsclient
- hybridapp
- json
- lmdb
- ln_core
- ln_glcore
- ln_glgui
- ln_store
- localization
- localization_gui
- localnotification
- magnetometer
- mdns
- mqtt
- mqtt-store
- multitouch
- oauth
- orientation
- p256ecdsa
- png
- portaudio
- pregexp
- pressure
- prime
- pushnotification
- redcap
- rsa
- rtaudio
- rupi
- rotation
- sanestring
- scheduler
- serial
- sets
- settings
- simplexnoise
- sqlite
- ssax
- syntax-case
- timestamp
- ttf
- uiform
- url
- uuid
- vibrate
- videoplayer
- watchdog
- website
- xml
- zip