Node:Anatomy, Next:Attributes, Previous:Options, Up:Top
A chart comprises a set of components. Each component belongs to a certain class, from which an instance tailored for a particular chart is generated. The standard set of component classes follow:
area
class defines the size, the location, and the coordinate
system (linear, logarithmic, etc) of a chart (see area). It also
contains axes, plots, and legends, as described below. At least one
Area must be created in any chart.
axis.X
and
axis.Y
, corresponding to horizontal and vertical axes.
plot
class actually draws a chart. Several subclasses of
plots are provided by PyChart, including line plots
(see line_plot), range-fill plots (see range_plot), bar plots
(see bar_plot), and pie plots (see pie_plot). You can draw
multiple plots in a single chart, and most of the times you can even mix
different types of plots, e.g., line plots and bar plots.
legend
class is an optional rectangular box that describes
what each plot means (see legend).
text_box
is an optional rectangular box that contains
arbitrary text. It can also contain arrows (see text_box).
canvas
is a "virtual paper" that defines graph-drawing
primitives, such as lines, rectangles, and texts. One canvas corresponds
to one output file. Canvas is used by other components in the graph and
is usually not manipulated by users directly. It's handy, however, if
you want to draw a line/circle/text/etc, directly on the Postscript or
PDF file. See canvas.