Guile Charting

(charting draw)

Overview

 

Usage

draw-annotations [cr] [annotations] [xticks] [width] [height]
[Function]
draw-axis-label [cr] [text] [text-height] [axis-length] [vertical?]
[Function]

Draw an axis label.

The label will be drawn such that the current position of cr is the closest corner of the label's bounding box.

draw-background [cr]
[Function]

Draw the background.

draw-bar [cr] [height] [scale] [bar-width] [bar-value-formatter] [series] [decorator]
[Function]

Draw a single bar.

cr is expected to have been placed at the lower left corner of where the bar should be. decorator is a property list that can be passed to charting draw draw-decorator.

draw-bar-group [cr] [data] [bar-width] [scale] [bar-value-formatter]
[Function]

Draw a group of bars.

data is a property list suitable for passing to charting draw draw-bar. cr is expected to have been positioned along the x axis in the center of where the bar group should be displayed.

draw-bar-legend [cr] [data] [width] [text-height] [font-family] [horizontal-spacing] [vertical-spacing]
[Function]

Draw a "bar legend".

A bar legend is meant to show what categories exist, as well as indicating their contribution to a graph. Use a bar legend if it would be confusing to label some other chart in which the pixel count of a category is proportional to its magnitude, but you want to make sure to label all categories, even those with small magnitudes.

data is as in charting draw draw-page-map. The legend will be written below the current position of cr.

draw-chart-area [cr] [width] [height]
[Function]

Draw the actual box for the chart background.

cr is expected to have been positioned at the origin.

draw-decorator [cr] [scale] [label] [y+-bracket] [y--bracket] [y-bracket]
[Function]

Draw a decorator.

A decorator is something drawn around a point, such as error bars. This function currently supports drawing error bars in the Y direction, which are specified individually as y+-bracket and y--bracket.

draw-grid [cr] [ticks] [width] [vertical?]
[Function]

Draw grid lines.

ticks is a list of positions in the current cairo coordinate system. width is the that the grid lines should be: the chart width of vertical?, and the height otherwise.

draw-legend [cr] [expand-right?] [expand-down?] [measure-only?] [text-height] [draw-outlines?] [draw-background?] [text-measurer] [series-list]
[Function]

Draw a legend.

series-list is expected to be a list of series names. The cr is expected to be positioned at one of the corners of the legend; expand-right? and expand-down? control which way the legend will be rendered.

draw-page-map [cr] [data] [chart-width] [chart-height] [page-size] [page-height] [page-spacing]
[Function]

Draw a page map for the given data set.

data := (label . (start . size)) ...)

label is a string, and start and size are numbers. cr is expected to have been positioned at the lower-left corner of the chart area.

draw-perf-series [cr] [data] [xticks] [box-width] [box-spacing] [min-y] [y-scale] [box-value-formatter]
[Function]

Draw a group of boxes corresponding to runs of one benchmark in different scenarios.

data := (x point ...) ...)

, where the series is a string, and the points are numbers. cr is expected to have been positioned along the x axis in the center of where the data for the test should be displayed.

draw-perf-test [cr] [data] [box-width] [box-spacing] [min-y] [y-scale] [box-value-formatter]
[Function]

Draw a group of boxes corresponding to runs of one benchmark in different scenarios.

Each scenario corresponds to a series. The format of data is ((series point ...) ...), where the series is a string, and the points are numbers. cr is expected to have been positioned along the x axis in the center of where the data for the test should be displayed.

draw-point [cr] [x] [y] [label]
[Function]

Draw a point at the current position.

draw-tick-labels [cr] [tick-labels] [tick-size] [vertical?] [text-height]
[Function]

Draw tick labels on an axis.

tick-labels is an alist of label-position pairs, where position is in the current cairo coordinate system, along one axis.

draw-ticks [cr] [ticks] [tick-size] [vertical?]
[Function]

Draw ticks on an axis.

ticks is a list of positions in the current cairo coordinate system.

draw-title [cr] [text] [font-size]
[Function]

Draw a title.

cr is expected to have been positioned at the lower boundary of where the title should be written, in the center.

reset-colors!
[Function]