2 Anatomy of a chart

#
2 Anatomy of a chart

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 below picture shows example of a chart and its components.

The standard set of component classes follow:

`area.T`:

  This class defines the size, the location, and the coordinate system (linear, logarithmic, etc) of a chart ( see Section 6). It also contains axes, plots, and legends, as described below. At least one Area must be created in any chart.

`axis.X`:
`axis.Y`:
  The axis class defines the look of an axis. You can specify, for example, the interval and the style of tick marks and grid lines ( see Section 6.2). PyChart provides two types of axes, `axis.X` and `axis.Y`, corresponding to horizontal and vertical axes.

`bar_plot.T`:
`line_plot.T`:
`pie_plot.T`:
`range_plot.T`:
`interval_plot.T`:
`rose_plot.T`:
  These classes actually plot a chart. 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.T`:
  The class draws an optional rectangular box that describes what each plot means ( see Section 6.3).

`text_box.T`:
  This class draws an optional rectangular box that contains arbitrary text. It can also contain arrows ( see Section 18).

`canvas.T`:
  The `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 Section 21.