Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the vgplot Reference Manual, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 18:14:13 2021 GMT+0.
• Introduction | What vgplot is all about | |
• Systems | The systems documentation | |
• Files | The files documentation | |
• Packages | The packages documentation | |
• Definitions | The symbols documentation | |
• Indexes | Concepts, functions, variables and data types |
# vgplot This common lisp library is an interface to the gnuplot plotting utility. The intention of the API is to resemble to some of the plot commands of octave or matlab. ## Usage (asdf:load-system :vgplot) or (ql:quickload :vgplot) (vgplot:plot '(1 2 3) '(0 -2 17)) For examples run the demo function: (vgplot:demo) and see API documentation in docs/vgplot.html or on http://volkers.github.io/vgplot/vgplot.html ## License Copyright (C) 2013 - 2021 Volker Sarodnick mail: (remove #\y (subseq "avoidspamyvolykerysyar@gymyx.net" 9)) GNU General Public License
Next: Files, Previous: Introduction, Up: Top [Contents][Index]
The main system appears first, followed by any subsystem dependency.
• The vgplot system |
Volker Sarodnick
GPL
Interface to gnuplot
vgplot.asd (file)
Files are sorted by type and then listed depth-first from the systems components trees.
• Lisp files |
• The vgplot.asd file | ||
• The vgplot/package.lisp file | ||
• The vgplot/vgplot.lisp file | ||
• The vgplot/demo.lisp file |
Next: The vgplot/package․lisp file, Previous: Lisp files, Up: Lisp files [Contents][Index]
vgplot.asd
vgplot (system)
Next: The vgplot/vgplot․lisp file, Previous: The vgplot․asd file, Up: Lisp files [Contents][Index]
Next: The vgplot/demo․lisp file, Previous: The vgplot/package․lisp file, Up: Lisp files [Contents][Index]
package.lisp (file)
vgplot (system)
vgplot.lisp
Previous: The vgplot/vgplot․lisp file, Up: Lisp files [Contents][Index]
vgplot.lisp (file)
vgplot (system)
demo.lisp
demo (function)
Next: Definitions, Previous: Files, Up: Top [Contents][Index]
Packages are listed by definition order.
• The vgplot package |
# vgplot
This common lisp library is an interface to the gnuplot plotting
utility.
The intention of the API is to resemble to some of the plot commands
of octave or matlab.
## Usage
(asdf:load-system :vgplot) or (ql:quickload :vgplot)
(vgplot:plot ’(1 2 3) ’(0 -2 17))
For examples run the demo function:
(vgplot:demo)
and see API documentation in docs/vgplot.html or on http://volkers.github.io/vgplot/vgplot.html
## License
Copyright (C) 2013 - 2021 Volker Sarodnick
mail: (remove #\y (subseq "avoidspamyvolykerysyar@gymyx.net" 9))
GNU General Public License
package.lisp (file)
common-lisp
Definitions are sorted by export status, category, package, and then by lexicographic order.
• Exported definitions | ||
• Internal definitions |
Next: Internal definitions, Previous: Definitions, Up: Definitions [Contents][Index]
• Exported special variables | ||
• Exported functions |
Next: Exported functions, Previous: Exported definitions, Up: Exported definitions [Contents][Index]
Actvate debugging when true.
vgplot.lisp (file)
Gnuplot binary. Change when gnuplot not in path.
vgplot.lisp (file)
Previous: Exported special variables, Up: Exported definitions [Contents][Index]
Do a 3d plot. Uses gnuplot’s ’splot’.
The inputs are similar to ’plot’, but with some key differences:
vals could be: x y z
x y z label-string
style commands in the label-string work the same as in ’plot’.
vgplot.lisp (file)
Set axis to limit-list and return actual limit-list, limit-list could be:
’(xmin xmax) or ’(xmin xmax ymin ymax),
values can be:
a number: use it as the corresponding limit
nil: do not change this limit
t: autoscale this limit
without limit-list do return current axis.
vgplot.lisp (file)
Create a bar plot y = f(x) on active plot, create plot if needed.
:x (optional) vector or list of x strings or numbers
plot to index if not provided
:y list of y ’((y &key :label :color) (y &key :label :color) ...)
y vector or list of y values
:label string for legend label (optional)
:color string defining the color (optional);
must be known by gnuplot, e.g. blue, green, red or cyan
:style (optional) "grouped" (default) or "stacked"
:width (optional) width of the bars where 1.0 means to fill the space completely
(for the gap in style "grouped" see parameter gap)
:gap (optional, only used in style "grouped") the gap between the groups
in units of width of one boxwidth
e.g.:
(bar :x #("Item 1" "Item 2" "Item 3")
:y ’((#(0.3 0.2 0.1) :label "Values" :color "blue")
(#(0.1 0.2 0.3) :label "Values" :color "red"))
:style "stacked"
:width 0.6)
vgplot.lisp (file)
Close all connected gnuplots
vgplot.lisp (file)
Close connected gnuplot
vgplot.lisp (file)
Add a new plot window to a current one.
vgplot.lisp (file)
Send a command directly to active gnuplot process, return gnuplots response print also response to stdout if print? is true
vgplot.lisp (file)
Add grid to plot if style t, otherwise remove grid.
If key parameter replot is true (default) run an additional replot thereafter.
vgplot.lisp (file)
Provide options to the legend aka keys.
:show Show legend (default)
:hide Hide legend
:boxon Use box around the legend
:boxoff Don’t use a box (default)
:left Title left of sample line (default)
:right Title right of sample line
:north Place legend center top
:south Center bottom
:east Right center
:west Left center
:northeast Right top (default)
:northwest Left top
:southeast Right bottom
:southwest Left bottom
:at x y Place legend at position x,y
:inside Place legend inside the plot (default)
:outside Place legend outside the plot
vgplot.lisp (file)
Return a list of found vectors (one vector for one column) in data file fname
(e.g. a csv-file).
Datafile fname must hold columns separated by spaces, tabs or commas (other separators may work),
content after # till end of line is assumed to be a comment and ignored.
vgplot.lisp (file)
Produce a two-dimensional plot using logarithmic scales scale for both axis. See the documentation of the plot command for a description of the arguments.
vgplot.lisp (file)
Add a new plot window to a current one.
vgplot.lisp (file)
Plot y = f(x) on active plot, create plot if needed.
vals could be: y plot y over its index
y label-string plot y over its index using label-string as label
x y plot y = f(x)
x y label-string plot y = f(x) using label-string as label
following parameters add curves to same plot e.g.:
x y label x1 y1 label1 ...
label:
A simple label in form of "text" is printed directly.
A label with added style commands: label in form "styles;text;":
styles can be (combinations possible):
"-" lines
":" dotted lines
"." dots
"+" points
"o" circles
"r" red
"g" green
"b" blue
"c" cyan
"k" black
"y" yellow
"m" magenta
"w" white
"#RRGGBB" sets an arbitrary 24-bit RGB color (have to be exactly 6 digits)
e.g.:
(plot x y "r+;red values;") plots y = f(x) as red points with the
label "red values"
vgplot.lisp (file)
Plot data-file directly, datafile must hold columns separated by spaces, tabs or commas
(other separators may work), use with-lines style.
:x-col (optional) column to use as x values.
plot to index if not provided
vgplot.lisp (file)
Print the actual plot into filename (a pathname).
Use the (optional) terminal or if not provided,
use the extension of filename to guess the terminal type.
Guessing of terminals works currently for: gif, pdf, png
Examples: (vgplot:print-plot #p"plot.pdf")
(vgplot:print-plot #p"plot.eps" :terminal "epscairo")
It is possible to give additional parameters inside the terminal parameter, e.g.: (vgplot:print-plot #p"plot.pdf" :terminal "pdfcairo size \"5cm\",\"5cm\"")
vgplot.lisp (file)
Return vector of values in a certain range:
(range limit) return natural numbers below limit
(range start limit) return ordinary numbers starting with start below limit
(range start limit step) return numbers starting with start, successively adding step untill reaching limit (excluding)
vgplot.lisp (file)
Send the replot command to gnuplot, i.e. apply all recent changes in the plot.
vgplot.lisp (file)
Produce a two-dimensional plot using a logarithmic scale for the X axis. See the documentation of the plot command for a description of the arguments.
vgplot.lisp (file)
Produce a two-dimensional plot using a logarithmic scale for the Y axis. See the documentation of the plot command for a description of the arguments.
vgplot.lisp (file)
Produce a stairstep plot.
vals could be: y plot y over its index
x y plot y = f(x)
x y label-string plot y = f(x) using label-string as label
following parameters add curves to same plot e.g.:
x y label x1 y1 label1 ...
For the syntax of label-string see documentation of plot command.
If you only want to prepare the sequences for later plot, see
function stairs-no-plot.
vgplot.lisp (file)
Prepare a stairstep plot, but don’t actually plot it.
Return a list of 2 sequences, x and y, usable for the later plot.
If one argument is given use it as y sequence, there x are the indices.
If both arguments are given use yx as x and y is y.
If you want to plot the stairplot directly, see function stairs.
vgplot.lisp (file)
Set up a plot grid with rows by cols subwindows and use location index for next plot command.
The plot index runs row-wise. First all the columns in a row are
filled and then the next row is filled.
For example, a plot with 2 rows by 3 cols will have following plot indices:
+—–+—–+—–+
| 0 | 1 | 2 |
+—–+—–+—–+
| 3 | 4 | 5 |
+—–+—–+—–+
Observe, gnuplot doesn’t allow interactive mouse commands in multiplot mode.
vgplot.lisp (file)
Add text label text-string at position x,y
optional:
:tag nr label number specifying which text label to modify
(integer you get when running (text-show-label))
:horizontalalignment "left"(default), "center" or "right"
:rotation degree rotate text by this angle in degrees (default 0) [if the terminal can do so]
:font "<name>" use this font, e.g. :font "Times" [terminal depending, gnuplot help
recommends: http://fontconfig.org/fontconfig-user.html for more information]
:fontsize nr
Observe, it could alter the font of the labels (aka legend or key in
gnuplot terms) if you change font or fontsize of a text field. To
explicitly chose fontsize (or font) for the label you could use:
(format-plot t "set key font \",10\"")
(replot)
vgplot.lisp (file)
Delete text labels specified by tags.
A tag is the number of the text label you get when running (text-show-label).
vgplot.lisp (file)
Show text labels. This is useful to get the tag number for (text-delete)
vgplot.lisp (file)
Add title str to plot. If key parameter replot is true (default) run an additional replot thereafter.
vgplot.lisp (file)
Add x axis label. If key parameter replot is true (default) run an additional replot thereafter.
vgplot.lisp (file)
Add y axis label. If key parameter replot is true (default) run an additional replot thereafter.
vgplot.lisp (file)
Previous: Exported definitions, Up: Definitions [Contents][Index]
• Internal functions | ||
• Internal generic functions | ||
• Internal classes |
Next: Internal generic functions, Previous: Internal definitions, Up: Internal definitions [Contents][Index]
If possible, add delete of tmp files to exit hooks. (implemented on sbcl and clisp)
vgplot.lisp (file)
Count data columns in strings like "1 2 3 # comment", seperators could be a variable number of spaces, tabs or the optional separator
vgplot.lisp (file)
Delete files in tmp-file-list and return nil
vgplot.lisp (file)
Do the actual plot. For documentation see doc string of the macro plot
vgplot.lisp (file)
l is a list in the form
((:x x :y y :label lbl :color clr) (:x x :y y :label lbl :color clr) ...).
Return minimal difference of two consecutive x values
vgplot.lisp (file)
Return color command string or empty string
vgplot.lisp (file)
Return the used separator in data string
t for whitespace (standard separator in gnuplot)
c separator character
nil comment line (or empty line)
vgplot.lisp (file)
Coerce sequences in l except strings to lists:
(listelize-list ’(#(1 2 3) #(a b c)))
-> ((1 2 3) (A B C))
vgplot.lisp (file)
Return a function that removes the files in tmp-file-list.
vgplot.lisp (file)
Update README and html documentation. Load cl-api before use.
vgplot.lisp (file)
vgplot.lisp (file)
Return minimal difference between 2 consecutive elements in x.
Throw an error if x is not increasing, i.e. difference not bigger than 0
vgplot.lisp (file)
Start gnuplot process and return stream to gnuplot
vgplot.lisp (file)
Parse gnuplot string e.g.
" set xrange [ * : 4.00000 ] noreverse nowriteback # (currently [1.00000:] )"
and return range as a list of floats, e.g. ’(1.0 3.0)
vgplot.lisp (file)
Parse input values to plot and return grouped list: ((x y lbl-string) (x1 y1 lbl-string)...) Create x if not existing.
vgplot.lisp (file)
Parse string s and return the found numbers separated by separator
vgplot.lisp (file)
Parse label string e.g. "-k;label;" and return key list (list :style style :color color :title title).
vgplot.lisp (file)
Parse input values to plot and return grouped list: ((x y lbl-string) (x1 y1 lbl-string)...) For efficiency reasons return ((y nil lbl-string)(...)) if only y given
vgplot.lisp (file)
Analogous to parse-vals, but for 3d plots.
Parse input values to 3d-plot and return grouped list: ((x y z lbl-string) (x1 y1 z1 lbl-string) ...)
vgplot.lisp (file)
Print commands in lst and run them after a (read-char), ENTER continue, all other characters break and quit demo
Read from stream and print directly (non blocking). Return read string
vgplot.lisp (file)
Read from stream and return string (non blocking)
vgplot.lisp (file)
Convert members of sequence v to strings using format-string and concatenates the result.
vgplot.lisp (file)
Coerce all sequences except strings to simple-vectors
vgplot.lisp (file)
Coerce lists in vals to simple-vectors
vgplot.lisp (file)
Coerce :x and :y lists in vals to vectors
vals has the form
((:x x :y y :label lbl :color clr) (:x x :y y :label lbl :color clr) ...)
vgplot.lisp (file)
Next: Internal classes, Previous: Internal functions, Up: Internal definitions [Contents][Index]
automatically generated reader method
vgplot.lisp (file)
automatically generated writer method
vgplot.lisp (file)
automatically generated reader method
vgplot.lisp (file)
automatically generated writer method
vgplot.lisp (file)
automatically generated reader method
vgplot.lisp (file)
automatically generated writer method
vgplot.lisp (file)
Previous: Internal generic functions, Up: Internal definitions [Contents][Index]
Holding properties of the plot
vgplot.lisp (file)
standard-object (class)
(vgplot::open-plot)
plot-stream (generic function)
(setf plot-stream) (generic function)
multiplot-p (generic function)
(setf multiplot-p) (generic function)
tmp-file-list (generic function)
(setf tmp-file-list) (generic function)
Previous: Definitions, Up: Top [Contents][Index]
• Concept index | ||
• Function index | ||
• Variable index | ||
• Data type index |
Next: Function index, Previous: Indexes, Up: Indexes [Contents][Index]
Jump to: | F L V |
---|
Jump to: | F L V |
---|
Next: Variable index, Previous: Concept index, Up: Indexes [Contents][Index]
Jump to: | (
3
A B C D E F G L M N O P R S T V X Y |
---|
Jump to: | (
3
A B C D E F G L M N O P R S T V X Y |
---|
Next: Data type index, Previous: Function index, Up: Indexes [Contents][Index]
Jump to: | *
M P S T |
---|
Jump to: | *
M P S T |
---|
Previous: Variable index, Up: Indexes [Contents][Index]
Jump to: | C P S V |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
C | |||
Class, plots : | Internal classes | ||
| |||
P | |||
Package, vgplot : | The vgplot package | ||
plots : | Internal classes | ||
| |||
S | |||
System, vgplot : | The vgplot system | ||
| |||
V | |||
vgplot : | The vgplot system | ||
vgplot : | The vgplot package | ||
|
Jump to: | C P S V |
---|