Graphite Vision Statement
Overview
We propose a Python graphing package called Graphite. Graphite will enable the easy creation of 2D and 3D scientific, engineering, and business graphs. Some graph types to be included are line graphs, bar charts, function plots, polar plots, parametric plots, and mesh plots. Graphite will be able to produce output for formats such as PostScript, PDF, GIF, QuickDraw, Tk, and Windows.
Background
Python is a high-level, object-oriented language developed originally at CWI in Amsterdam, and now at CNRI in Reston, VA. It is a young language, developed initially in 1990, but its use has been increasing, probably due to a number of attractive features such as:
- fully cross-platform compatible
- functional (i.e., functions are a basic datatype, as in LISP)
- sophisticated namespace protection
- well-integrated support for object-oriented programming
- sophisticated exception handling
- a large library of pre-built modules for a variety of tasks
- free and open source
These features allow one to develop programs in Python with a fraction of the code needed in lower-level languages such as C/C++; and the code is generally considered easier to learn and read than alternatives such as Perl.
Traffic on the Python mailing list has been increasing at an accelerating rate since 1991, with no signs of levelling off. A number of organizations use Python, including NASA, IBM, SGI, LANL, and LLNL. Of course it is difficult to extrapolate to actual numbers, but it is clear that the Python developer community is growing.
A significant subset of these 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.
Product Requirements
A new Python package is needed to fill this gap in functionality. This package should have the following attributes:
- 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.
Potential Users
We see several major groups of users:
- Scientists and engineers who already use Python for its numerical analysis capabilities will appreciate being able to generate graphs in the same environment, rather than having to export the data to an external graphing program. An integrated package will allow them to more quickly interact with their data, and its platform-independence will allow them to send analysis scripts to their peers and be certain that these scripts will run correctly.
- Students and educators will be able to use the package while learning programming with Python, or while exploring the basics of scientific data analysis. Open-source packages are ideal for such users because they combine low cost with professional-level power; but these users also require that the package be relatively easy to use.
- Many webmasters already use Python in conjunction with their web sites for search engines, CGI scripts, and stats analysis. A graphing package that can generate GIF, JPEG, or PNG files will be ideal for generating graphs of these collected statistics.
- Business users may use such a package to prepare graphs for presentations and reports. Since many desktop applications (e.g., Excel) are adequate for this task, business users will most likely be limited to those who are already using Python for other purposes.
We will be able to reach many of these users via the
comp.lang.python newsgroup. In addition, some potential users have already been identified in past discussions about the need for such a package.
Risks
The project might fail for a variety of reasons.
- Other graphing software is already commonly used in the marketplace. Some examples of similar graphing packages are IDL, Excel, GnuPlot, Xmgr, SigmaPlot, CricketGraph, Matlab, Mathematica,
existing python plot packages, etc. We will analyze these competing packages with respect to our product requirements. From an initial understanding of these packages, we feel that each of them has drawbacks in relation to our requirements. Also, since our graphing package leverages an existing user population, we will only have to directly compete with current python packages. These packages however are not portable or very well integrated with python.
- Poor design or implementation could result in insufficient flexibility, reliability, or ease of use. This risk will be mitigated as much as possible through rapid prototyping and incremental development and delivery.
Conclusion
We are proposing a Python module for generating high-quality plots, tentatively named "Graphite". If the set of requirements is achieved, Graphite will fill an important gap in current Python functionality. We've identified potential users in the scientific, engineering, and education fields, as well as web designers and possibly others. The biggest risk to the project is that some other package will be collectively judged by the Python community to be more useful. While all of the current packages we have surveyed appear to be lacking, we may have missed one, or a new one may be developed in time to compete with Graphite.
http://www.strout.net/info/coding/python/graphite/vision.html
Last Updated:
4/06/99
. . . . . .
webmaster@strout.net