7.2 faces.charting.charts -- Charting Module

This modules contains all classes you need for creating charts. You can see their hierarchy in figure 7.1. The class with gray background are used internally and should not be sub-classed by faces projects. The complete charting module depends on the matplotlib library.

All charts can specify a properties attribute that influences the display style of graphical objects. The properties has to be a dictionary that specifies values for several style keys. A style key is a string sequence separated by dots, specifying a style group and style attribute. The following example specify a properties attribute:

properties = {
    "marker.edgecolor" : "blue",
    "marker.linewidth" : 2,
    "focused.marker.edgecolor" : "red",
    "fill" : 1,
    }
The different dictionary items mean: The following style attributes are possible:
family
Sets the font family. Valid value are "serif", "sans-serif", "cursive", "fantasy", "monospace" or any font name.
style
Sets the font style. Valid values are: "normal", "italic" or "oblique".
weight
Set the font weight. This is a numeric value in the range 100, 200, 300, ..., 900.
size
Sets the font size. Valid values are either an absolute value of "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"; or a relative value of "smaller" or "larger"; or an absolute font size, e.g. 12.
variant
Sets the font variant. Valid values are either "normal" or "small-caps".
color
Sets the text color. Valid value are any html hex string like '#eeefff' or legal html names for colors, like 'red', 'burlywood' and 'chartreuse'.
edgecolor
Sets the edge color. Valid values are the same like in color.
facecolor
Sets the face color. Valid values are the same like in color.
fill
Sets wether objects should be filled. Valid value are True, False
antialiased
Set whether to use antialiased rendering. Valid value are True, False Set the alpha value used for blending - not supported on all backends. Valid value are floats between 0.0 and 1.0.
linewidth
Sets the linewidth in points. Valid values are any float.
linestyle
Sets the linestyle. Valid values are 'solid', 'dashed', 'dashdot', 'dotted'.

Figure 7.1: The Class Hierarchy of the Charts classes
\includegraphics[width=\textwidth,height=.4\textheight]{reference/charts}

The module defines the following classes:

class MatplotChart( )
This is the abstract base class of all Charts, providing some fundamental services for charts to access the matplotlib.

class TimeWidgetChart( )
A chart which arrange widget objects horizontally in time and vertically in rows.

class TimePlotChart( )
A chart which plots data versus time.

class TimeMultiChart( )
A chart which combines several charts together.

class TimeTableChart( )
A time chart which can have tables on the left and right site.

class TableChart( )
A chart which arranged widget objects in rows and columns.

class TimeAxisChart( )
A time chart with a time axis. The time axis is responsible for drawing the scale and the grid of time charts.

class TimeAxisWidgetChart( )
Like TimeWidgetChart but with a time axis.

class TimeAxisPlotChart( )
Like TimePlotChart but with a time axis.

class TimeAxisMultiChart( )
Like TimeMultiChart but with a time axis.

class TimeAxisTabledChart( )
Like TimeTabledChart but with a time axis.

class GanttChart( )
A standard gantt chart.

class ResourceChart( )
A standard resource chart.

class WorkBreakdownChart( )
A standard workbreakdown chart.

See Also:

http://matplotlib.sourceforge.net/
The matplotlib library



Subsections