Next: Graphite Goals and Status
Up: Graphite A portable graphing
Previous: Graphite A portable graphing
A significant subset of Python users are scientists and engineers, who make
use of Python's numeric processing capabilities. Python has built-in support
for a variety of numeric types, including integer, real, and complex numbers
of various sizes. There is also a contributed module called Numeric, developed
originally at MIT and now supported by LLNL, which adds an efficient datatype
for multidimensional matrices, and associated functions and operations for manipulating
such data. Additional modules provide extra support for applications such as
Fourier transforms and linear algebra. Together, these packages offer a powerful
alternative to such commercial packages as Matlab. Python has won many converts
in this arena because of its more sophisticated language, its large collection
of pre-built modules, and its open-source nature.
However, Python's utility as a number-crunching environment comes with one serious
drawback: there is no good, portable graphing module. The user community is
fractionated by a large number of incompatible graphing utilities, none of them
well-integrated with Python, none available on all platforms, and most lacking
in functionality. This is a severe limitation when compared to a package such
as Matlab, which has powerful graphing capabilities and is portable to all platforms.
A graphing package should satisfy the following goals:
- [Print-quality graphing]The package should be able to produce graphs
up to the standards of scientific journals, magazines, newspapers, and other
professional media. Graph types should include all common 2D plots, and possibly
3D graphs as well.
- [Platform independence]The package should run identically on any system
which runs Python.
- [Output options]The package should be able to generate graphs to the
screen, for interactive data visualization, as well as to a variety of common
graphics formats such as Postscript, GIF, and PICT.
- [Flexibility]The user should ultimately have control over nearly every
detail of a graph, such as line type, tick type and positioning, axis labelling,
etc. In addition, it should be possible to define new element types by deriving
from existing graph elements, to use one graph as an inset in another, and so
on.
- [Easy to use]A common problem with powerful graphing packages is their
complexity, which can overwhelm new users. The package should minimize this
difficulty as much as possible, through the use of GUI option-setting tools,
preset but adjustable graph stationery, and clean design.
- [Good language integration]The package should be integrated with Python
in such a way that the user can take full advantage of the language features.
That is, graph and graph elements should be Python objects, with properties
available in the same way as other objects; and the package should accept common
Python types (including functions) as parameters.
- [Open source]Like all of Python, the graphing package should be open
source and freely available. This allows end-users to readily inspect and extend
the package, or to fix bugs if any are found. Extending the package by adding
new graph types should be made especially feasible.
- [Graph Reusability]Users should be able to save graph formats so they
can apply the same format to different data. This ability will allow for sharing
of common formats with others.
Graphite attempts to meet all of the above goals. Print-quality graphing
is made possible by the fact that Graphite can generate Postscript or PDF
output.
These output formats are a result of using PIDDLE [3] which also
gives Graphite Platform independence . The PIDDLE interface specifies
a set of interactive functions which could at some point be used for interactive
graph manipulation. Every property of the Graph object can be changed by the
user to providing Flexibility . In order to make Graphite Easy-to-use
there is a small set of utility functions which automate such things as reading
data from a delimited file, selecting columns from that data, and generating
output to a PIDDLE canvas. Also, reasonable defaults allow for quick graphing
of data without setting any of the Graph properties. For Good language
integration Graphite uses Python as its base language. Graphite is Open
source and freely available at http://www.strout.net/python/graphite. Graph
reusability is only somewhat possible at this point, but more support for this
is planned for future releases.
First we discuss more concrete Graphite goals (such as plot format types)
and their status. Next, we step through the creation of an example graph,
show how a user might change various options. Then we describe the
software architecture
of Graphite, and various design issues.
Finally, we cover related and future
work.
Next: Graphite Goals and Status
Up: Graphite A portable graphing
Previous: Graphite A portable graphing
Michelle Mills Strout
11/15/1999