Skip to content

Index of Module graph

Matthias Görges edited this page Mar 16, 2015 · 44 revisions

Module: graph

The graph module is a Scheme-based implementation of the public domain C-Graph vector plotting library. It is intended for generation of scientific graphs. The engine is designed to support multiple output backends. Currently only PDF or SVG are implemented.

Simple examples of usage can be found in modules/graph/examples.

Functions in this module:

Function Short Description
(graph? g) Return #t if argument is a graph, #f otherwise
(graph-aorigin g x y) Sets page origin in inches
(graph-axisenable g a n) Toggles rendering of axis and numbers
(graph-box g x1 y1 x2 y2) Inserts a box with corners (x1,y1) and (x2,y2)
(graph-circle g x y r) Inserts a circle at (x,y) of radius r
(graph-clear g) Clear elements in a graph context
(graph-closepathstroke g) Closes current path and strokes it
(graph-color g c) Sets the current pen color
(graph-dash g t p) Sets the line type
(graph-font g fn fs) Sets font for text rendering
(graph-frame g) Draws an axis frame
(graph-htextcenter g x y s) Draws centered horizontal text
(graph-htextleft g x y s) Draws left-aligned horizontal text
(graph-htextright g x y s) Draws right-aligned horizontal text
(graph-line g x1 y1 x2 y2) Draw line between points
(graph-linearstyle g p o d t l) Sets style of linear axes
(graph-lineto g x y) Draw invisible line from current pen position
(graph-linewidth g w) Sets the width of lines
(graph-logstyle g n t d p l l10) Sets style of logarithmic axes
(graph-marker g x y t s) Draws a marker
(graph-mesh g) Draws a graph mesh
(graph-moveto g x y) Moves pen position
(graph-new w h . s) Creates a new graph context
(graph-output g type . filename) Renders a graph
(graph-reset g) Resets a graph context
(graph-rgbcolor g r g b)) Sets the current pen color as RGB
(graph-rlineto g x y) Draws relative to current pen position
(graph-rmoveto g x y) Moves relative to current pen position
(graph-rorigin g x y) Sets origin relative to current origin
(graph-setcoord g t) Selects active coordinate system
(graph-solidbox g x1 y1 x2 y2) Draws a filled box
(graph-solidcircle g x y r) Draws a filled circle
(graph-solidtriangle g x1 y1 x2 y2 x3 y3) Draws a filled triangle
(graph-stroke g) Strokes the current path
(graph-triangle g x1 y1 x2 y2 x3 y3) Draws an open triangle
(graph-vtextbottom g x y s) Draws vertical bottom-aligned text
(graph-vtextcenter g x y s) Draws vertical centered text
(graph-vtexttop g x y s) Draws vertical top-aligned text
(graph-xaxis g) Draws an X axis
(graph-xlabel g v) Sets the X axis label
(graph-xlinear g sze min max ofs tic num) Creates a linear X axis
(graph-xlog g sze min max ofs) Creates a logarithmic X axis
(graph-yaxis g) Draws a Y axis
(graph-ylabel g s) Sets the Y axis label
(graph-ylinear g sze min max ofs tic num) Creates a linear Y axis
(graph-ylog g sze min max ofs) Creates a logarithmic Y axis
Clone this wiki locally