Overview Clamps Packages CM Dictionary Clamps Dictionary Fomus
Next: plot-2d , Previous: playing , Up: P , Home: Overview

Clamps Dictionary

plot

Generic Function

(plot data &rest args &key xrange yrange header options grid |3d| region num-values x-axis lt data-fn &allow-other-keys)

Plot obj using GnuPlot.

Arguments

obj The object to be plotted. Currently the following object types are implemented:
  seq A sequence of numbers, interpreted as y-values of successive x-values starting at 0. Pairs as elements of seq are interpreted as 2d coordinates of data points. Vectors, arrays or lists are valid sequences.
  Function A function of one argument. Displays the values of applying function to x-values in the range [0..1].
  incudine:buffer Display the contents of an incudine buffer. For a sample buffer this acts like a waveform display, but any buffer data can be displayed.
:xrange A list of two values defining the left and right margin of x-values of the plot.
:yrange A list of two values defining the bottom and top margin of y-values of the plot.
:header A string supplied as a header to GnuPlot before initiating the plot command.
:lt Member of (:lines :points) denoting line type.
:options A string with options for GnuPlot.
:grid Boolean indicating whether to use a grid.

Example

(plot '(5 4 6 1 9)) ; => (5 4 6 1 9)
plot-01.svg
Figure 12: output of (plot '(5 4 6 1 9))
(plot '((-2 5) (0 8) (4 -2) (6 10)))  ; => ((-2 5) (0 8) (4 -2) (6 10))
plot-02.svg
Figure 13: output of (plot '((-2 5) (0 8) (4 -2) (6 10)))
(defun my-fn (x) (* x x)) ; => my-fn

(plot #'my-fn)  ; => #<function my-fn>
plot-03.svg
Figure 14: output of (plot #'my-fn)
(plot #'my-fn :xrange '(-10 10)) ; => #<function my-fn>
plot-04.svg
Figure 15: output of (plot #'my-fn :xrange '(-10 10))
(ensure-sfz-preset :flute-nv)

(plot (first (sfz-preset-buffer :flute-nv 60)))
plot-05.svg
Figure 16: output of (plot (first (sfz-preset-buffer :flute-nv 60)))
(plot '((0 0 0) (0 1 0) (0 1 1) (0 0 1) (1 0 0) (1 1 0) (1 1 1) (1 0 1))
      :3d t
      :lt :points)
plot-06.svg
Figure 17: 3d plot

See also

Author: Orm Finnendahl

Created: 2025-12-12 Fr 21:36

Validate