Introduction

PyCha is a very simple Python package for drawing charts using the Cairo library. Its lead developer is Lorenzo Gil Sanchez.

PyCha aims to be:

  • Lightweight
  • Simple to use
  • Nice looking with default values
  • Customizable

The following charts are currently supported (see screenshots below):

  • horizontal bar charts (pycha.bar.HorizontalBarChart)
  • vertical bar charts (pycha.bar.VerticalBarChart)
  • pie charts (pycha.pie.PieChart)
  • line charts (pycha.line.LineChart)
  • scatter charts (pycha.scatter.ScatterChart)

New in version 0.5.0.

  • stacked horizontal bar charts (pycha.bar.StackedHorizontalBarChart)
  • stacked vertical bar chart (pycha.bar.StackedVerticalBarChart)

Support for stacked bar charts is planned for a future release.

PyCha is distributed under the terms of the GNU Lesser General Public License.

If you require more advanced graphs, you might want to consider matplotlib.

Screenshots

  • horizontal bar chart
_images/hbarchart.png
  • vertical bar chart
_images/vbarchart.png
  • stacked vertical bar chart
_images/vstackedbarchart.png
  • pie chart
_images/piechart.png
  • line chart
_images/linechart.png
  • scatter chart
_images/scatterchart.png

Output Formats

PyCha uses the Cairo library so it should support all Cairo surfaces.

Please refer to Ex1: Save Chart to File and Ex2: Embed Chart in GTK App for examples.

Get Involved

PyCha has a mailing list at http://groups.google.com/group/pycha. Questions and ideas are welcome.