.

Class canvas

Use this to make a drawing surface of type eps, pdf, or svg (for now). Most simple plots use a single canvas and one or more drawables to get their work done.

Initialize with following parameters:

canvas_typedefault: 'eps' Canvas type: Can be eps, pdf, svg (for now).
titledefault: 'default' Base name of the output file. Output will be
of the form: 'title.canvas_type'
dimensionsdefault: ['3in','2in'] Size of the drawing surface.
default_fontdefault: 'Helvetica' Default font for text.
verbosedefault: False Whether to add more info into output file.
scriptdefault: __file__ Name of the file calling into zplot; recorded in header.

canvas.text()

Use this routine to place text on the canvas. Most options are obvious: the expected coordinate pair, color, text, font, size - the size of the font, rotation - which way the text should be rotated, but the anchor can be a bit confusing. Basically, the anchor determines where, relative to the coordinate pair (x,y), the text should be placed. Simple anchoring includes left (l), center (c), or right (r), which determines whether the text starts at the x position specified (left), ends at x (right), or is centered on the x (center). Adding a second anchor (xanchor,yanchor) specifies a y position anchoring as well. The three options there are low (l), which is the default if none is specified, high (h), and middle (m), again all determining the placement of the text relative to the y coordinate specified.

coorddefault: [0,0] Coordinates for text on the canvas.
textdefault: 'text' Actual text to place on the canvas.
fontdefault: 'default' Typeface to use.
colordefault: 'black' Color of letters.
sizedefault: 10 Font size.
rotatedefault: 0 Rotate text by this many degrees.
anchordefault: 'c' Anchor: can either just specify left/right
(e.g., 'c' for center, 'l' for left justify, 'r' for right)
or can also specify vertical alignment (e.g., 'l,h' for left justify and high justify,
'r,c' for right and center, 'l,l' for left and low).
bgcolordefault: '' Background color behind text? Empty means no.
bgborderdefault: 1 Border (black) around background color?

canvas.line()

Use this to draw a line on the canvas.

coorddefault: [[0,0],[0,0]] Coordinates of the line. A list of [x,y] pairs. Can
be as long as you like (not just two points).
linecolordefault: 'black' Color of the line.
linewidthdefault: 1 Width of the line.
linejoindefault: 0 For turns in the line, how turn should be rounded.
Options include 0->'miter', 1->'round', 2->'bevel'.
Default is just do hard turns (miter).
linecapdefault: 0 Shape used at end of line (0->'butt', 1->'round', 2->'square')
linedashdefault: 0 Dash pattern of the line. '0' means no dashes.
Otherwise, a list describing the on/off pattern
of the dashes, e.g., [2,2] means 2 on, 2 off, repeating.
closepathdefault: False Can use this to close the path (and perhaps fill it).
However, not really supported right now.
arrowdefault: False Turn an arrow at last segment on or off.
arrowheadlengthdefault: 4 Length of arrow head.
arrowheadwidthdefault: 3 Width of arrow head.
arrowlinecolordefault: 'black' Color of arrow head line.
arrowlinewidthdefault: 0.5 Width of line that makes arrow head.
arrowfilldefault: True Fill arrow head with solid color?
arrowfillcolordefault: 'black' Color to fill arrow head with.
arrowstyledefault: 'normal' Style to use. 'normal' is one option. There are no others.

canvas.box()

Makes a box at coords specifying the bottom-left and upper-right corners. Can change the width of the surrounding line (linewidth=0 removes it). Can fill with solid or pattern. When filling with non-solid pattern, can add a background color so as not to be see-through.

coorddefault: [[0,0],[0,0]] Coordinates of box, from [x1,y1] to [x2,y2].
linecolordefault: 'black' Color of lines that draws box.
linewidthdefault: 1 Width of those lines. 0 means unlined box.
linedashdefault: 0 Dash pattern in lines around box?
linecapdefault: 0 How should corners be done? 0 is default; 1->'round', 2->'bevel'.
linejoindefault: 0 For turns in the line, how turn should be rounded.
Options include 0->'miter', 1->'round', 2->'bevel'.
Default is just do hard turns (miter).
filldefault: False Should box be filled? If so, specify here.
fillcolordefault: 'black' Color of the fill pattern.
fillstyledefault: 'solid' Type of fill pattern. Right now, all are 'solid'.
fillsizedefault: 3 Details of fill pattern includes size of each marker in pattern.
fillskipdefault: 4 Also includes spacing between each marker in pattern.
rotatedefault: 0 Rotate the box by this many degrees.
bgcolordefault: '' Put a background color behind the box. Useful when pattern has
see-through parts in it.

canvas.circle()

Can just make circles with this. Can fill them too. Exciting!

coorddefault: [0,0] Coordinates of center of circle in [x,y].
radiusdefault: 1 Radius of circle.
scaledefault: [1,1] Scale in x direction and y direction, to make
an ellipse, for example.
linecolordefault: 'black' Color of lines of circle.
linewidthdefault: 1 Width of lines of circle.
linedashdefault: 0 Whether line is dashed or not.
filldefault: False Fill circle with colored pattern?
fillcolordefault: 'black' Which color?
fillstyledefault: 'solid' Which pattern?
fillsizedefault: 3 Details of pattern: size of each marker.
fillskipdefault: 4 Details of pattern: space between each marker.
bgcolordefault: '' Background color behind circle, useful if fill pattern
has some holes in it.

canvas.polygon()

Use this method to make an arbitrary polygon, by passing in its coordinates. All the usual arguments are specified.

coorddefault: [] The list of [x,y] pairs that form the coordinates.
linecolordefault: 'black' The color of the surrounding line (if width > 0).
linewidthdefault: 1 The width of the line (0 for no line).
linecapdefault: 0 The linecap.
linejoindefault: 0 The linejoin.
linedashdefault: 0 The line dash pattern.
filldefault: False Fill the polygon?
fillcolordefault: 'black' What color to fill it?
fillstyledefault: 'solid' What style to fill it with?
fillsizedefault: 3 The fill size...
fillskipdefault: 4 ...and the skip.
bgcolordefault: '' A background color if there is no fill; useful
behind a pattern.

.

Class drawable

Creates a drawable region onto which graphs can be drawn. Must define the xrange and yrange, which are each min,max pairs, so that the drawable can translate data in table into points on the graph. Also, must select which type of scale each axis is, e.g., linear, log10, and so forth. If unspecified, coordinates (the x,y location of the lower left of the drawable) and dimensions (the width, height of the drawable) will be guessed at; specifying these allows control over where and how big the drawable is. Other options do things like place a background color behind the entire drawable or make an outline around it.

Initialize with following parameters:

canvasdefault: '' Canvas object upon which to draw.
dimensionsdefault: [] Dimensions of the drawable surface; e.g., ['1in','1in'].
If left as empty list, will make a guess as to size.
coorddefault: [] Lower-left corner of drawable should be placed at this
location on the canvas. If left as empty, will make a guess.
xrangedefault: [] X range of the drawable.
yrangedefault: [] Y range of the drawable
xscaledefault: 'linear' Scale to use ('linear' or 'log2' or 'log10' or 'logX')
for x range; currently, no other types of scales supported.
yscaledefault: 'linear' Scale to use ('linear' or 'log2' or 'log10' or 'logX')
for y range; currently, no other types of scales supported.

drawable.map()

Can be used to map coordinates from something a drawable understands to something that can be used on the canvas directly. Useful when placing text or shapes on the canvas directly; pass d.map([x,y]) for example to the coord= argument of a canvas direct draw function (such as text, line).

coorddefault: ['',''] The coordinates to translate from the drawable coordinate system
to the canvas raw coordinates. Coordinates can be a single list
[x,y] or, for e.g. a line, a list of points [[x1,y1],[x2,y2]].

.

Class table

Tables store data to be plotted, and provide a thin layer over SQLite to select subsets of the data to plot. A table can be created and filled with contents of a file (the 'file' parameter) OR created and filled with data from another table (the 'table' parameter). When filling with data from a file, it is useful to pass in a 'separator' which tells the table class how the rows in the file are split. Default is whitespace.

Initialize with following parameters:

filedefault: '' File name where table should be populated from;
file should have fixed number of columns of data.
tabledefault: '' If file name is not specified (as above), can populate
a table with data from another table (this makes a copy).
wheredefault: '' When initializing a table from another table, use the
'where' option to perform a selection of which data you want.
For example, 'where=c0 > 10' populates the new table with
all rows where the first value in the row (i.e., c0) is
greater than 10.
separatordefault: '' When reading from a file, use the 'separator' to split each
line and thus decide the different entries for that line.
Default is to use whitespace; a colon is a common one too.

table.getaxislabels()

This method takes a column of data and returns it in a form so you can directly pass it to the axis() class as either the 'xmanual' or 'ymanual' parameter. Thus, you can call axis as follows: axis(xmanual=t.getaxislabels('c0'), ...) to get the values from column 'c0' of table 't' and use it to label the x axis (in this example).

columndefault: '' Which column to grab the data from.

table.dump()

Used to dump the contents of the table to stdout.

titledefault: '' A title to add to the output for clarity.
canvasdefault: None Can add this to the output as well as a comment.

table.insert()

Allows SQL insert directly into a table. SET column1=value, column2=value2,... WHERE some_column=some_value Format of keyValues should be ... XXX

keyValuesdefault: {} Needs a better description.

table.update()

Enables an update() of values in a column. Can use to sum two columns, for example.

setdefault: '' Specify how to set values in one column. Can just set a column
to a specific value (e.g., set='c0 = 100') or can do math
across some columns (e.g., set='c0 = c0 + c1').
wheredefault: '' Can operate on a subset of rows via selection.

table.getmax()

Utility function to get maximum value of a particular column.

columndefault: '' column to compute max over.
cmaxdefault: '' If specified, only return value from column if it's
greater than 'cmax'. Otherwise, just return max.

table.getmin()

Returns min value over a given column.

columndefault: '' Column to get data from.
cmindefault: '' Only return values if they are less than cmin.
If not specified, just return min found.

table.getrange()

Gets the [min, max] of a column and returns it as a list.

columndefault: '' The column to perform min, max over.
crangedefault: '' If not empty, 2-element list with min value
and max value not to go below/exceed when looking
for min and max in the column.

table.getvalues()

Returns values in a column as a list.

columndefault: '' Column to get values of.

table.getavg()

Compute average over a column and return it.

columndefault: '' Column over which to compute average.
wheredefault: '' Where clause used to select subset of rows.

table.query()

Get data from table via a query.

wheredefault: '' Where clause to select which data to return.
orderdefault: '' Which column to order the results by; '' -> don't order.
selectdefault: '*' * selects all columns, or you can pick a subset.
groupdefault: '' The group by clause also useful sometimes.

table.addcolumns()

Add a bunch of columns all at once.

columnsdefault: [] columns to add to the table, all at once

table.addcolumn()

Add a column to the table, and initialize it with value.

columndefault: '' Column to be added.
valuedefault: '' Value to initialize column to.

.

Class plotter

Use this to draw some points on a drawable. There are some obvious parameters: which drawable, which table, which x and y columns from the table to use, the color of the point, its linewidth, and the size of the marker. 'style' is a more interesting parameter, allowing one to pick a box, circle, horizontal line (hline), and 'x' that marks the spot, and so forth. However, if you set 'style' to label, PlotPoints will instead use a column from the table (as specified by the 'label' flag) to plot an arbitrary label at each (x,y) point. Virtually all the rest of the flags pertain to these text labels: whether to rotate them, how to anchor them, how to place them, font, size, and color.

Initialize with following parameters:

drawabledefault: '' The default drawable for this plotter. However, you can
specify a different drawable when making specific graphs
(which thus overrides this default).

plotter.points()

Use this to draw points, as specified by x,y of a table, onto a drawable. Basically, how you make a scatter plot is with the points() method.

drawabledefault: '' Drawable object to place points onto.
tabledefault: '' Table object to suck data from.
wheredefault: '' Where clause: which rows to plot? Default is all rows.
xfielddefault: 'c0' Table column with x data.
yfielddefault: 'c1' Table column with y data.
shiftdefault: [0,0] Shift points in x,y direction by this amount.
sizedefault: 2.0 Size of each point; used unless sizefield is specified.
styledefault: 'xline' Lots of styles available for these points, including:
label, hline, vline, plusline, xline, dline1, dline2, dline12,
square, circle, triangle, utriangle, diamond, star, asterisk.
sizefielddefault: '' If specified, table column with sizes for each point.
Allows point size to vary which is a nice feature.
sizedivdefault: '' If using sizefield, use sizediv to scale each value (each
sizefield gets divided by sizediv to get to the final size).
linecolordefault: 'black' Color of the line of the marker.
linewidthdefault: 1.0 Width of lines used to draw marker.
filldefault: False For some shapes, filling makes sense; if desired, mark True.
fillcolordefault: 'black' If filling, use this fill color.
fillstyledefault: 'solid' If filling, which fill style: solid, hline, vline, hvline,
dline1, dline2, dline12, circle, square, triangle, utriangle.
fillsizedefault: 3.0 Size of object in pattern.
fillskipdefault: 4.0 Space between object in pattern.
labelfielddefault: '' If specified, table column with labels for each point.
labelformatdefault: '%s' If specified, table column with labels for each point.
labelrotatedefault: 0 If using labels, rotate labels by this many degrees.
labelanchordefault: 'c,c' If using labels, how to anchor them. 'x,y' where x can be
'c' or 'l' or 'r' (for center, left, right) and y can be
'c' or 'h' or 'l' for center, high, low).
labelplacedefault: 'c' If using labels, place text: 'c' centered on point,
's' below [south], 'n' above [north], 'e' east, 'w' west.
labelshiftdefault: [0,0] Shift text in label x,y direction
labelfontdefault: 'default' If using labels, what font.
labelsizedefault: 6.0 If using labels, fontsize for label.
labelcolordefault: 'black' If using labels, what color font.
labelbgcolordefault: '' If using labels, put a background color behind each.
legenddefault: '' Which legend object to use to add legend text to.
legendtextdefault: '' Text to add to legend.
stackfieldsdefault: [] Fields to add to yfield to determine y coord.
Can use this instead of table methods.

plotter.horizontalbars()

Use this to plot horizontal bars. The options are quite similar to the vertical cousin of this routine, except (somehow) less feature-filled (hint: lazy programmer).

drawabledefault: '' Drawable object on which to put the bars.
tabledefault: '' Table from which to draw data.
wheredefault: '' SQL select to subset the data as need be.
xfielddefault: 'c0' Table column with x values.
yfielddefault: 'c1' Table column with y values.
xlovaldefault: '' If specified, table column with xlo data; use if bars
don't start at the minimum of the range.
barwidthdefault: 1.0 Width of the bars.
linecolordefault: 'black' Color of the lines.
linewidthdefault: 1.0 Width of the lines. 0 means no lines at all!
filldefault: False Whether to fill each bar with some pattern.
fillcolordefault: 'black' Fill color for bars (if fill=True).
fillstyledefault: 'solid' Fill style for bars (if fill=True).
fillsizedefault: 3 Fill size (if pattern has a marker of some size in it).
fillskipdefault: 4 Fill space between markers (if pattern has marker).
bgcolordefault: '' Background color for bar - can make sense if pattern
contains little markers, for example, because you can
use this to fill in a background color then.
legenddefault: '' Legend object (if using a legend).
legendtextdefault: '' Text for legend.
stackfieldsdefault: [] Fields to add to yfield to determine y coord.

plotter.verticalbars()

Use this to plot vertical bars on a drawable. A basic plot will specify the table, xfield, and yfield. Bars will be drawn from the minimum of the range to the y value found in the table. If the bars should start at some value other than the minimum of the range (for example, when the yaxis extends below zero, or you are building a stacked bar chart), two options are available: ylofield and yloval. ylofield specifies a column of a table that has the low values for each bar, i.e., a bar will be drawn at the value specifed by the xfield starting at the ylofield value and going up to the yfield value. yloval can be used instead when there is just a single low value to draw all bars down to. Some other interesting options: labelfield, which lets you add a label to each bar by giving a column of labels (use rotate, anchor, place, font, fontsize, and fontcolor flags to control details of the labels); barwidth, which determines how wide each bar is in the units of the x-axis; linecolor, which determines the color of the line surrounding the box, and linewidth, which determines its thickness (or 0 to not have one); and of course the color and fill of the bar, as determined by fillcolor, fillstyle, and fillsize and fillskip.

drawabledefault: '' drawable to place vertical bars upon.
tabledefault: '' table to get data from.
wheredefault: '' SQL clause to subset some of the data
xfielddefault: 'c0' xfield to use
yfielddefault: 'c1' yfield to use
ylofielddefault: '' if specified, table column with ylo data; use if bars
don't start at the minimum of the range
stackfieldsdefault: [] fields to add to yfield to determine y coord
ylovaldefault: '' if there is no ylofield, use this value to fill down to;
if empty, just use min of yrange
barwidthdefault: 1.0
clusterdefault: [0,1] of the form n,m; thus, each x-axis data point actually
will have 'm' bars plotted upon it; 'n' specifies which
cluster of the 'm' this one is (from 0 to m-1); width of
each bar is 'barwidth/m'; normal bar plots (without
clusters) are just the default, '0,1'
linecolordefault: 'black' color of the line surrounding each bar
linewidthdefault: 0.25 width of the line; set to 0 if you don't want a
surrounding line on the box
filldefault: False fill the box or not
fillcolordefault: 'gray' fill color (if used)
fillstyledefault: 'solid' solid, boxes, circles, ...
fillsizedefault: 3 size of object in pattern
fillskipdefault: 4 space between object in pattern
bgcolordefault: '' color background for the bar; empty means none (patterns
may be see through)
labelfielddefault: '' if specified, table column with labels for each bar
labelformatdefault: '%s' use this format for the labels; can prepend and postpend
arbitrary text
labelrotatedefault: 0 rotate labels by this many degrees
labelanchordefault: '' text anchor if using a labelfield; empty means use a
best guess
labelplacedefault: 'o' place label (o) outside of bar or (i) inside of bar
labelshiftdefault: [0.0,0.0] shift text in x,y direction
labelfontdefault: 'default' if using labels, what font should be used
labelsizedefault: 10.0 if using labels, font for label
labelcolordefault: 'black' if using labels, what color font should be used
labelbgcolordefault: '' if specified, fill this color in behind each text item
legenddefault: '' which legend?
legendtextdefault: '' text to add to legend

plotter.line()

Use this function to plot lines. It is one of the simplest routines there is -- basically, it takes the x and y fields and plots a line thru them. It does NOT sort them, though, so you might need to do that first if you want the line to look pretty. The usual line arguments can be used, including color, width, and dash pattern.

drawabledefault: '' Drawable object to place points onto.
tabledefault: '' Table object to suck data from.
wheredefault: '' Where clause: which rows to plot? Default is all rows.
xfielddefault: 'c0' Table column with x data.
yfielddefault: 'c1' Table column with y data.
stairstepdefault: False plot the data in a stairstep manner (e.g., CDF) if this is True
linecolordefault: 'black' color of line.
linewidthdefault: 1.0 width of line.
linejoindefault: 0 specifies "linejoin". Options include 0->'miter', 1->'round', 2->'bevel'
Default is miter
linecapdefault: 0 Shape used at end of line (0->'butt', 1->'round', 2->'square')
linedashdefault: 0 dash pattern - 0 means no dashes. [2,2] means line of 2, space of 2
labelfielddefault: '' if specified, table column with labels for each point in line.
Rest of label args spec things about the lables.
labelplacedefault: 'n' which direction from point to place label. n->north, etc.
labelfontdefault: 'default' which font to use
labelsizedefault: 8.0 size of text for labels.
labelcolordefault: 'black' color of label text.
labelanchordefault: 'c' how to anchor the text relative to the point.
labelrotatedefault: 0 angle (degrees) to rotate text.
labelshiftdefault: [0,0] shift the labels by [x,y]
labelformatdefault: '%s' format string to use for labels
labelbgcolordefault: '' put a box of color behind each label
labeloffsetdefault: 3.0 if using labels, how much to offset from point by
legenddefault: '' legend object to use for this; '' means none.
legendtextdefault: '' text to associate with this specific line in legend.
symbstyledefault: '' if adding points as well - a convenience?
symbsizedefault: 2
symbfilldefault: False

plotter.function()

Use function() to plot a function right onto a drawable. The function should simply take one argument (e.g., x) and return the value of the function (e.g., f(x)).

drawabledefault: '' drawable to place function upon.
functiondefault: '' the function, such as 'x*x' or 'x' or '3*x + 10', etc.
xrangedefault: [0,10] the x-range the function should be plotted over [xmin,xmax]
stepdefault: 1 given the range of xmin to xmax, step determines at which x
values the function is evaluated and a line is drawn to
ylimitdefault: ['',''] if given, limit function to values between low/hi y values
linewidthdefault: 1 line width
linecolordefault: 'black' line color
linedashdefault: 0 dash pattern; 0 for none.
legenddefault: '' legend object
legendtextdefault: '' text to associate with this line.

plotter.horizontalintervals()

Use this to plot interval markers in the x direction. The y column has the y value for each interval, and draws the interval between the ylo and yhi column values. The marker can take on many forms, as specified by the 'align' flag. Note the 'b' type in particular, which can be used to assemble box plots.

drawabledefault: '' drawable object
tabledefault: '' table object with data
wheredefault: '' select a subset of the table?
yfielddefault: '' table column with y data
xlofielddefault: '' table column with xlo data
xhifielddefault: '' table column with xhi data
aligndefault: 'c' c-center u-upper l-lower n-none
linecolordefault: 'black' color of the line
linewidthdefault: 1 width of all lines
devwidthdefault: 3 width of interval marker on top

plotter.verticalintervals()

Use this to plot interval markers in the y direction. The x column has the x value for each interval, and draws the interval between the ylo and yhi column values. The marker can take on many forms, as specified by the 'align' flag. Note the 'b' type in particular, which can be used to assemble box plots.

drawabledefault: ''
tabledefault: ''
wheredefault: ''
xfielddefault: 'c0'
ylofielddefault: 'c1'
yhifielddefault: 'c2'
aligndefault: 'c'
linecolordefault: 'black'
linewidthdefault: 1
devwidthdefault: 3

plotter.verticalfill()

Use this function to fill a vertical region between either the values in yfield and the minimum of the y-range (default), the yfield values and the values in the ylofield, or the yfield values and a single yloval. Any pattern and color combination can be used to fill the filled space.

drawabledefault: '' the drawable object
tabledefault: '' table object
wheredefault: '' where clause to select subset of data if need be
xfielddefault: '' table column with x data
yfielddefault: '' table column with y data
ylofielddefault: '' if not empty, fill down to this column value
ylovaldefault: '' if no ylofield, use this value to fill down to;
if empty, use min of y-range
stairstepdefault: False use stairsteps in making fill
fillcolordefault: 'lightgrey' fill color (if used)
fillstyledefault: 'solid' solid, boxes, circles, ...
fillsizedefault: 3 size of object in pattern
fillskipdefault: 4 space between object in pattern
legenddefault: '' which legend object?
legendtextdefault: '' text to add to legend

plotter.heat()

Use this to plot a heat map. A heat map takes x,y,heat triples and plots a gray-shaded box with darkness proportional to (heat/divisor) and of size (width by height) at each (x,y) coordinate.

drawabledefault: '' drawable object
tabledefault: '' name of table to use
wheredefault: '' subset of table via query?
xfielddefault: 'c0' table column with x data
yfielddefault: 'c1' table column with y data
hfielddefault: 'heat' table column with heat data
widthdefault: 1 width of each rectangle
heightdefault: 1 height of each rectangle
divisordefault: 1.0 how much to divide heat value by
labeldefault: False if true, add labels to each heat region reflecting count value
labelfontdefault: 'default' if using labels, what font should be used
labelcolordefault: 'orange' if using labels, what color is the font
labelsizedefault: 6.0 if using labels, what font size should be used
labelformatdefault: '%.2f' if using labels, what should the format be

.

Class axis

Use this to draw some axes. There are a huge number of options. A first decision might be which 'style' to use: 'x' (x axis only), 'y' (y axis), 'xy' (for x and y axes), and 'box' to put a box around the entire thing. Making multiple axes is nice if you have, for example, two y axes for different data sets plotting onto the same drawable.

Initialize with following parameters:

drawabledefault: '' The drawable object upon which to draw this axis.
linecolordefault: 'black' The color of axis line.
linewidthdefault: 1.0 The width of axis line.
linedashdefault: 0 dash parameters; will make axes dashed, but not tic marks.
0 means no dashes; otherwise use a list to specify the
dash pattern (e.g., [2,2], or [2,3,2], etc.).
styledefault: 'xy' Which axes to draw: 'xy', 'x', 'y', 'box' are the options.
labelstyledefault: 'out' Labels 'in' or 'out'? for xaxis, 'out' means below and
'in' above; for yaxis,'out' means left/'in' right
ticstyledefault: 'out' Are tics 'in', 'out', or 'centered'? (inside the axes,
outside them, or centered upon the axes)
doaxisdefault: True Whether to draw the actual axes or not; useful if you just
want to draw the tic marks, for example.
dolabelsdefault: True Whether to put labels on or not.
domajorticsdefault: True Whether to put majortics on axes or not.
doxmajorticsdefault: True Whether to put major tics on x-axis.
doymajorticsdefault: True Whether to put major tics on y-axis.
dominorticsdefault: False Whether to put minortics on axes or not.
doxminorticsdefault: True Whether to put major tics on x-axis.
doyminorticsdefault: True Whether to put major tics on y-axis.
doxlabelsdefault: True Whether to put labels on x-axis.
doylabelsdefault: True Whether to put labels on y-axis.
xaxisrangedefault: '' The min/max values to draw xaxis between; empty (default)
means the whole range.
yaxisrangedefault: '' The min/max values to draw yaxis between; empty (default)
means the whole range.
xaxispositiondefault: '' The y value that the x-axis is located at; empty gives you
the min; ignored by 'box'.
yaxispositiondefault: '' The x value that the y-axis is located at; empty gives you
the min; ignored by 'box'.
xautodefault: ['','',''] [x1,x2,step] will put labels and major tics from 'x1' to 'x2'
with 'step' between each; can leave any of these empty ('')
and the method will fill in a guess (either the min or max
of range, or a guess for the step), e.g., [0,'',2] means
start at 0, fill in the max of the xrange for a max value,
and set the step to 2. The default is to guess these values.
xmanualdefault: '' Specify labels/majortics by hand with a list of form:
[['label1', x1], ['label2', x2]...]. Can also be filled in
from a table column with method table.getaxislabels(column=).
yautodefault: ['','',''] Similar to xauto, but for the y-axis.
ymanualdefault: '' Similar to xmanual, but for y-axis.
ticmajorsizedefault: 4.0 Size of the major tics.
ticminorsizedefault: 2.5 Size of the minor tics.
xminorticcntdefault: 1 how many minor tics between each major tic (x axis)
yminorticcntdefault: 1 how many minor tics between each major tic (y axis)
xlabelfontdefault: 'default' Font to use for x labels.
xlabelfontsizedefault: 10.0 font size of labels for x labels.
xlabelfontcolordefault: 'black' font color for x labels.
xlabelrotatedefault: 0 Rotation for x labels, in degrees. If not 0, 90 is common.
xlabelbgcolordefault: '' If non-empty, put a background colored square behind xlabels.
xlabelanchordefault: '' Text anchor for labels along the x axis; empty means guess.
xlabelformatdefault: '' Format string for xlabels; e.g., %d for ints; empty (default)
implies best guess; can also use this to add decoration to
the label, e.g., '%i %%' will add a percent sign to each
integer label, and so forth.
ylabelfontdefault: 'default' Font to use for y labels.
ylabelfontsizedefault: 10.0 font size of labels for y labels.
ylabelfontcolordefault: 'black' font color for y labels.
ylabelrotatedefault: 0 Rotation for x labels, in degrees. If not 0, 90 is common.
ylabelbgcolordefault: '' If non-empty, put a background colored square behind ylabels.
ylabelanchordefault: '' Text anchor for labels along the x axis; empty means guess.
ylabelformatdefault: '' Format string for y labels; see xlabelformat for details.
xlabeltimesdefault: 1 What to multiply xlabel values by; e.g., if 10, 1 becomes 10,
2 becomes 20, and so forth.
ylabeltimesdefault: 1 Similar to xlabeltimes, but for y label values.
xlabelshiftdefault: [0,0] Shift xlabels left/right, up/down (+4,-3 -> right 4, down 3)
ylabelshiftdefault: [0,0] Similar to xshift, but for ylabels.
xtitledefault: '' Title along the X axis.
xtitlefontdefault: 'default' Font to use for x title.
xtitlesizedefault: 10 Font size for x title.
xtitlecolordefault: 'black' Font color for xtitle.
xtitleplacedefault: 'c' General placement of xtitle: 'c' for center, 'l' for left, 'r' for right.
xtitlecoorddefault: '' Coordinates of title; if empty, guess (you can always
adjust final placement with -xtitleshift).
xtitleshiftdefault: [0,0] Use this to adjust title place left/right, up/down.
xtitlerotatedefault: 0 How much (in degrees) to rotate the title.
xtitleanchordefault: '' How to anchor text; empty means best guess.
xtitlebgcolordefault: '' If not-empty, color behind title.
ytitledefault: '' Same as with xtitle, but for ytitle.
ytitlefontdefault: 'default' Same as with xtitle, but for ytitle.
ytitlesizedefault: 10 Same as with xtitle, but for ytitle.
ytitlecolordefault: 'black' Same as with xtitle, but for ytitle.
ytitleplacedefault: 'c' Same as with xtitle, but for ytitle.
ytitlecoorddefault: '' Same as with xtitle, but for ytitle.
ytitleshiftdefault: [0,0] Same as with xtitle, but for ytitle.
ytitlerotatedefault: 90.0 Same as with xtitle, but for ytitle (default is different).
ytitleanchordefault: '' Same as with xtitle, but for ytitle.
ytitlebgcolordefault: '' Same as with xtitle, but for ytitle.
titledefault: '' Main title of the graph.
titlefontdefault: 'default' Same as with xtitle, but for main title.
titlesizedefault: 10.0 Same as with xtitle, but for main title.
titlecolordefault: 'black' Same as with xtitle, but for main title.
titleplacedefault: 'c' Same as with xtitle, but for main title.
titleshiftdefault: [0,0] Same as with xtitle, but for main title.
titlerotatedefault: 0 Same as with xtitle, but for main title.
titleanchordefault: '' Same as with xtitle, but for main title.
titlebgcolordefault: '' Same as with xtitle, but for main title.

.

Class grid

Just a simple way to draw grids onto graphs. While we generally don't like grids, some people do.

Initialize with following parameters:

drawabledefault: '' The relevant drawable upon which to place this grid.
linecolordefault: 'black' The color of grid lines.
linewidthdefault: 0.5 The width of grid lines.
linedashdefault: 0 Make grid lines dashed as per usual patterns. Examples:
0 for no dashes, [2,2] for length 2 lines with length 2
spaces, etc.
xdefault: True Specify false to turn off grid in x direction
(False means no vertical lines).
ydefault: True Specify false to turn off grid in y direction
(False means no horizontal lines).
xrangedefault: '' Empty means whole range, otherwise a [y1,y2] as beginning
and end of the range to draw vertical lines upon.
xstepdefault: '' How much space to skip between each x. grid line.
If log scale, this will be used in a multiplicative manner.
yrangedefault: '' Empty means whole range, otherwise a [x1,x2] as beginning
and end of the range to draw horizontal lines upon.
ystepdefault: '' How much space to skip between each y grid line.
if log scale, this will be used in a multiplicative manner.

.

Class legend

Minimal support for legends is provided. Initialize it first (e.g., L = Legend()). Then pass 'L' and other info into plotters. (e.g., legend=L, legendtext='foo'). Finally, call legend.draw() to make the legend on the plot.

Initialize with following parameters:

legend.draw()

Use this to draw a legend given the current entries in the legend.

canvasdefault: '' Legend draws directly onto canvas.
coorddefault: '' Where to place the legend (lower left point).
Note these are canvas coordinates; if you want to use a
drawable's coordinated (e.g., drawable 'd'), call d.map([x,y])
and pass the result into 'coord' here for the desired outcome.
styledefault: 'right' which side to place the text on, right or left?
widthdefault: 10.0 width of the picture to be drawn in the legend
heightdefault: 10.0 height of the picture to be drawn in the legend
vskipdefault: 3.0 number of points to skip when moving to next legend entry
hspacedefault: 4.0 space between pictures and text
downdefault: True go downward from starting spot when building the legend;
false goes upward
skipnextdefault: '' if non-empty, how many rows of legend to print(before)
skipping to a new column
skipspacedefault: 25.0 how much to move over if the 'skipnext' option is used to
start the next column
fontdefault: 'default' which type face to use
fontsizedefault: 10 size of font of legend, and color
fontcolordefault: 'black'
orderdefault: [] can specify a specific legend order ...