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 edgecolor of the style group marker will be blue.
- The linewidth of the style group marker will be 2.
- The edgecolor of the style group focused.marker will be red.
The style group focused.marker can be read as subclass of marker.
That means the linewidth of focused.marker will be also 2.
- All style groups that do not explicitly specify the fill attribute
will be filled.
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}](img58.png) |
The module defines the following classes:
-
This is the abstract base class of all Charts, providing some fundamental
services for charts to access the matplotlib.
-
A chart which arrange widget objects horizontally in time and vertically in rows.
-
A chart which plots data versus time.
-
A chart which combines several charts together.
-
A time chart which can have tables on the left and right site.
-
A chart which arranged widget objects in rows and columns.
-
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.
-
A standard gantt chart.
-
A standard resource chart.
class WorkBreakdownChart( |
) |
-
A standard workbreakdown chart.
Release 0.11.4, documentation updated on April 25, 2007.