Graphics/Viz
From DANSE
We evaluated both open source and commercial graphing and visualization packages for incorporation into the DANSE client. We reviewed plotting tools (http://www.python.org/topics/scicomp/plotting.html) that have python bindings, and more powerful scientific visualization software (http://www.cscs.ch/a-display.php?id=57) for higher dimensional data.
For each review, we installed the software and learned how to use it. The reviews were written by different individuals, but we discussed these packages among ourselves to try to develop a common basis for the evaluations. Like all evaluations, however, some subjectivity remains.
Authors: Victoria Winters, Mike McKerns, Tim Kelley, Olivier Delaire, Brent Fultz
Please direct comments on this article to the discussion page.
| Table of contents |
Chaco (scipy.plt)
Chaco (http://www.scipy.org/site_content/chaco) is a 2-D plotting package we considered looking into again, but according to the chaco mailing list (http://www.scipy.org/mailinglists/mailman?fn=scipy-chaco/2004-April/000528.html), the project is temporarily on hold while the developers work on a related client contract. As the end of 2003, chaco was still on version 0.1. However, it does show some promising features.
- Strengths
- it is pure python, and has full interactivity from the interpreter
- zoom and rescaling are easy
- fonts and titles can be easily modified
- integrated to the scipy suite, so has many math functions available
- can also manipulate images
- soon to be integrated with scipy.gplt (formerly gnuplot-py (http://gnuplot-py.sourceforge.net))
- Weaknesses
- formatting is somewhat easy (but a bit cryptic) from the python interpreter, but not editable from the plot
- relies on a strange invocation of gui_thread from wx_windows
- VERY early into the development phase
- undergoing a major makeover to make it look more like scipy.gplt
- appears to have only one plot type
- cannot select data to return from plot to interpreter
- documentation is a bit shallow
- Summary
- Too early in the development phase to be useful, and development is on hold
DISLIN
DISLIN (http://www.linmpi.mpg.de/dislin/) can produce 2D graphs, and 3D surfaces and false color plots with scripts in python (among other languages). Once installed, DISLIN can be imported as a python module.
- Strengths
- Lots of instructions and documentation.
- An extensive user manual (http://www.linmpi.mpg.de/dislin/manual.html) makes DISLIN easy to script in.
- Easy to install (http://www.linmpi.mpg.de/dislin/server.html) on most operating systems.
- TeX syntax can be used to type set mathematical formulas.
- Graphs can be written to many different file types.
- Weaknesses
- There are no 4-D false color static plots (the color on 3-D surfaces represents z-value).
- DISLIN can generate and display contour lines and isosurfaces, but the code required to do this (especially for more than one line or surface) is tedious.
- There is no command-line interface. All commands to define the plot are contained within a python script.
- There is little or no interactivity with the displayed plot.
- Mouse movements and clicks can be tracked and stored by DISLIN in the python interpreter, but a user would have to write a python program to use that data.
- A user cannot manipulate images, axes, titles, or anything else displayed in the window. The plot window didn't even redraw itself if it was temporarily covered.
- The python wrapper disipyl (http://kim.bio.upenn.edu/~pmagwene/disipyl) provides a more interactive window (http://kim.bio.upenn.edu/~pmagwene/disipyl/screenshots.html) in which to view a DISLIN graph, but the movements are controlled by buttons (click-and-pull on the screen would be better), only a beta version has been released so far, and it doesn't seem to be significantly different from DISLIN.
- Summary
- DISLIN's plots look much like Gnuplot's, but without the interactive features that Gnuplot is starting to offer. There is also no command-line interface, so a pyre component utilizing DISLIN would be many lines of code just to mimic Gnuplot's standard behavior, and still couldn't offer as much flexibility to the user.
HippoDraw
HippoDraw (http://www.slac.stanford.edu/grp/ek/hippodraw/) is a data analysis environment that can be controlled through the python interpretor or through a very user-friendly GUI. It specializes in histograms and false color plots, but has no 3D surface capabilities.
- Strengths
- HippoDraw has an extremely usable and intuitive user interface. Graphs are displayed in the canvas window (http://www.slac.stanford.edu/grp/ek/hippodraw/canvas_root.html), where they can be selected, moved or rescaled. In a second window called the inspector controls (http://www.slac.stanford.edu/grp/ek/hippodraw/inspector_root.html), the user can modify graph appearance, add text and labels, fit functions to data, or create new plots.
- New ntuples (the native HippoDraw datatype) can be created from existing plots, and ntuples are automatically created when a function is fit to data. These new ntuples include data to reproduce the appearance of the original data as it was displayed when it was fit, the residuals, the blue fit function, and the error bars.
- HippoDraw supports 12 different types of plots, and more data representation types can be created or modified. There are several types of plots that HippoDraw does especially well:
- 1-D Histograms
- 2-D Pseudocolor Histograms
- 3-D Pseudocolor Histograms and Plots
- Weaknesses
- While instructions on how to use the GUI are good, the doxygen documentation on how to control HippoDraw though python is difficult to use.
- HippoDraw is stable when used entirely through the GUI, but when it is controlled through the hippo or hippoplotter modules and then modified with the GUI it occasionally fails to perform certain functions, aborts python, or seg faults.
- There is not much control of displayed text. Text in title and axis labels can be changed, but the position or font cannot. Inserted text cannot be modified once it is on the canvas window. There is no support for mathematical typesetting.
- Installation requires the Boost library (http://www.boost.org/libs/libraries.htm) and Trolltech's Qt (http://www.trolltech.com/products/qt/index.html). These both take some effort, and are quite large.
- Summary
- HippoDraw displays and analyzes 1, 2, and 3-D data well, can create new data from existing plots, is easily controlled from python, and has a pleasant and simple user interface. This could impress users who are very concerned about interface and who would generally shy away from open source software because it is 'hard to use'. Still, we should extensively test the stability of any python script we write for it, since it can seg fault and behave unpredictably.
IGOR or IGOR Pro
IGOR or IGOR Pro (http://www.wavemetrics.com/) is a modestly-priced commercial software package intended primarily for 2-D plotting and curve fitting. A scripted list of operations on data, including formatted graphs, is saved on disk as an "experiment." IGOR runs under Mac OS 9.1, Mac OS X, and Windows 98/2000/ME/XP, and "experiment" files are interchangeable between these systems.
- Strengths
- IGOR Pro offers good interactivity with graphical data.
- It produces journal-quality scientific graphs, with adequate control over fonts and good control over lines, points, and symbols.
- It includes a wide range of capabilities for analysis including FFTs, integrations, differentiations, and convolutions.
- It has special support for time-series or other evenly-spaced data.
- It imports data in many formats, and acquires data from GPIB and the serial port.
- It is completely programmable via a built-in programming environment, and can be extended by external code (XOPs) written in C.
- It allows much analysis without use of a programming language by using extensive menus, dialogs, and the mouse. These operations can be saved as scripts.
- It runs on Macintosh and Windows computers, and IGOR's data files are cross-platform compatible.
- Weaknesses
- IGOR has some 3-D capabilities, but it is primarily intended for 2-D graphics.
- Only one "experiment" can be open at one time, although a "data browser" allows access to raw data in other "experiments."
- Final publication-quality graphics may require touch-up in Photoshop or equivalent.
- It is a proprietary package, although the SANS software from NIST can be run with a demonstration version of IGOR.
- It has many capabilities, but most users will not utilize many of them without study of the extensive documentation.
- There is no practical way to integrate IGOR into the pyre framework because its command line is not accessible from an external program or operating system.
- IGOR does not run on Linux systems.
- Summary
- IGOR is a convenient package for performing quick analyses on 2-D data sets, with excellent graphics speed and quality. It can utilize code written in C. Unfortunately it is not possible to pass control information to IGOR, launching IGOR with parametric data from a operating system command-line, for example.
Matlab
MATLAB (http://www.mathworks.com/) is a commercial quantitative programming environment distributed by MathWorks. It is advertised as a "high-level technical computing language and interactive environment for algorithm development, data visualization, data analysis, and numerical computation." Matlab is available on a variety of platforms, such as Linux, Solaris, HP-UX, Windows XP and Mac OS X. Unfortunately, the license is relatively expensive, except for student versions.
- Strengths
- Through use of Python bindings, the Matlab command line in now accessible from Python.
- Matlab provides a large collection of numerical solvers and linear algebra routines
- User-defined functions are easily implemented and saved in ‘.m’ files.
- Data is easily imported into Matlab. One can import data in a variety of file formats: ascii, binary, XML, HDF4/5, Microsoft excel, images, etc.
- Analyzed data in the workspace can be saved in ascii or binary MAT-files.
- The manual and help files are extensive and well written. Profuse additional documentation can be found online and numerous books about Matlab exist.
- The graphics capabilities are very strong. Matlab provides 2-D and 3-D plotting functions, 3-D volume visualization functions, tools for interactively creating plots, and the ability to export results to many popular graphics formats. You can customize plots by adding multiple axes; changing line colors and markers; adding annotations, LaTEX equations and legends; and drawing shapes.
- Vector data can be visualized with 2-D plotting functions such as:line, area, bar, and pie charts, direction and velocity plots, histograms, polygons and surfaces, scatter/bubble plots, animations.
- MATLAB provides functions for visualizing 2-D matrices, 3-D scalar, and 3-D vector data. You can specify plot characteristics, such as camera viewing angle, perspective, lighting effect, light source locations, and transparency. 3-D plotting functions include: surface, contour, mesh, image plots, cone, slice, stream, and isosurface.
- Weaknesses
- Matlab is a commercial package, although there are free Matlab “clones” (Scilab, Octave, Rlab).
- Matlab is a huge package. You can’t learn everything about it at once.
- Although recent versions offer the capability to compile code to C, C++ and binary code, programs developed in C++ from scratch are expected to be faster
- The more expensive developer's version is necessary to utilize the python bindings.
- Summary
- Matlab is a large commercial package. It offers a vector-oriented high level programming language, efficient for developing algorithms and adequate to perform small-scale computations. It has powerful graphics capabilities for visualizing complex data sets. We have written Python bindings for Matlab, so it is callable from Python.
IDL
IDL (http://www.rsinc.com/idl) is a programming platform designed for visualizing large and complex datasets. You can create powerful visualizations, including simple 2D plots, image displays, interactive 3D graphics designed to take advantage of OpenGL hardware acceleration and volume displays designed to take advantage of multiple processors for rapid rendering.
Unlike some other packages listed here, IDL is not so much a graphing package it is a platform for developing graphing packages.
- Strengths
- Built in viz capabilities:
- 2D and 3D plotting
- data slicing, mapping, and cuts
- false color mapping
- animations
- point-and-click interactivity with new "i-tools" a substantial improvement.
- Scripting language with array support.
- Math libraries such as LAPACK and many math operations built in.
- Built in GUI builder and toolkit.
- Skilled programmer can write procedures that run quickly relative to other interpreted/byte compiled languages.
- Some ability to extend by dynamically linking.
- Built in viz capabilities:
- Weaknesses
- Closed-source, proprietary.
- Expensive: license on order of thousands of dollars+ depending on platform, plus annual "maintainence" fees.
- Poor support for large scale development:
- only rudimentary OO support (this was obviously an afterthought)
- no namespaces
- Platform dependent extension mechanism.
- Python bindings exist (written by DANSE developers or otherwise (http://www.astro.uio.no/~mcmurry/python-idl)), however they are underdeveloped.
- Summary
- A great solution for small projects because it provides some basic graphics, data structures, memory management, and a GUI toolkit right out of the box--hence its enduring popularity in the astronomy and neutron communities for example. IDL is less promising as a large scale integration platform, as too many compromises have been made and it is just not a decent systems platform.
ParaView
ParaView (http://www.paraview.org) is funded by the US Department of Energy ASCI Views (http://www.dp.doe.gov/asc) program. The goal of the project is to develop scalable parallel processing toole with an emphasis on distributed memory implementations. ParaView runs on distributed and shared memory parallel as well as single processor systems. ParaView uses the Visualization Toolkit (http://www.vtk.org) as the data processing and rendering engine and has a user interface written using a unique blend of Tcl/Tk and C++.
- Strengths
- If configured with MPI, ParaView can distribute large sets of data among multiple processors and support off-screen rendering on satellite nodes. These capabilities can be turned on with command line flags when ParaView is started. There is also a client/server mode that seems similar.
- ParaView can read may file types, including HDF5 and ASCII format in plot3D files.
- The GUI is well-organized, and the user can manipulate (translate, zoom, rotate) displayed data with intuitive mouse gestures.
- ParaView can create
- pseudocolor isosufaces (and clips)
- cuts
- streamtraces
- animations
- Weaknesses
- ParaView's scripting language is tcl.
- ParaView offers so many features that the GUI can be difficult to navigate, and a desired data representation difficult to create.
- ParaView does not plot 2-D data well, but it handles 2-D cuts just fine.
- Text can only be written in the four corners of the screen with the same formatting, or as a text glyph which is difficult to position in 3-space. There is also no way to typeset mathematical formulas.
- Summary
- ParaView could be useful in viewing higher-dimensional data, especially if we can use the MPI features and if tcl is not too much of a drawback.
PyGist
PyGist (http://bonsai.ims.u-tokyo.ac.jp/~mdehoon/software/python/pygist.html) is a Python Interface to Gist Graphics, which has 2D and 3D graphing capabilities (similar to DISLIN) accessible from python.
- Strengths
- Pygist is somewhat interactive. Clicking on the graph will let you zoom or scale.
- There is fine-grain control of coloring schemes and lighting (light source position, sharpness, and strength) for 3D surface plots.
- Weaknesses
- Plot properties cannot be modified interactively.
- Control of the plot through python is somewhat tedious.
- Summary
- PyGist has many of DISLIN's advantages and disadvantages, and is probably not worth including unless there is a request for it.
grace
Grace (http://plasma-gate.weizmann.ac.il/Grace) is a Motif-based 2D plotting tool that yields output exactly as seen on the screen (a 'WYSIWYG' plotter). Grace's capabilities are roughly similar to a combination of GUI-based programs like Sigmaplot or Microcal Origin with script-based tools like Gnuplot or Genplot. Grace provides both a convienient point-and-click GUI and a scripting interface, and can produce true publication quality graphics. Grace was designed for easy customization, flexibility, extensibility, and analysis capability.
GracePlot (http://www.chemist-engineer.com/professional/software/GracePlot) (or alternaltely, gracePlot (http://www.idyll.org/~n8gray/code)) is a python module providing bindings to grace. Python bindings to grace are not terribly mature; there are two versions of roughly the same python code, each with slightly different strengths and weaknesses. However, we have added an interactive prompt to the gracePlot bindings.
- Strengths
- Publication quality graphics
- Has robust point-and-click GUI interface
- Data modified or generated in the GUI can be exported/saved in a file
- Precise control and customization (http://plasma-gate.weizmann.ac.il/Grace/screenshots) of graph and text
- No limit to the number of simultaneous graphs, formats, or plots within a graph
- Built-in programming language, where all aspects of plot outlook can be programmed
- Extensive curve fitting and analysis features including:
- Linear and nonlinear least-squares
- Calculation and display of residuals
- Arbitrarily complex user-defined fitting functions
- Dynamically loadable user-defined C/Fortran/... modules
- Fitting with constraints, arbitrary weight functions, and region restrictions
- FFT, histogramming, and sorting capabilities
- Integration and differentiation
- Splines, Interpolation and smoothing
- Convolution, correlation, and covariation
- Weaknesses
- Has it's own programming language (the GUI is so good, however, you may never use the programming language).
- Python bindings are underdeveloped.
- Uses Motif, which is free -- as long as you use an open-source os.
- GUI menu organization could be better.
- Summary
- This is an extremely powerful, flexible, and customizable 2D graphing package. The only real complaint is that the python bindings are a bit weak. However, the new interactive interpreter shell that we have added to the python bindings significantly enhances the effectiveness of the bindings.
PGPLOT
The PGPLOT (http://www.astro.caltech.edu/~tjp/pgplot) Graphics Subroutine Library is a Fortran- or C-callable, device-independent graphics package for making simple scientific graphs. The library is intended for making graphical images of publication quality with minimum effort on the part of the user. For most applications, the program can be device-independent, and the output can be directed to the appropriate device at run time. PGPLOT also provides a set of 'device handler' subroutines for output on various terminals, image displays, dot-matrix printers, laser printers, and pen plotters.
ppgplot (http://efault.net/npat/hacks/ppgplot) is a python module providing bindings to the PGPLOT graphics library. ppgplot uses the Numeric Python module to efficiently represent and manipulate vectors and matrices.
- Strengths
- All functions are directly callable from Python.
- Has a wide variety of output formats.
- Base library has a clean seperation from visualization device driver.
- Can produce publication-quality graphics.
- High flexibility for labelling, fonts, plot manipulation, etc.
- Can produce 2-D, 3-D, and false color intensity plots:
- 2-D false color contour plot
- 2-D Histogram
- Can produce animations, interactive boxes, text, buttons:
- Interactive programming
- 3-D animation .
- Has some interactive drawing capabilities for polygons and figures.
- Has mouse-capture to retrieve data points from cursor position.
- Based in C and Fortran, so intensive graphics still run quickly.
- Weaknesses
- Relatively difficult to use.
- Development has, for the most part, ceased.
- The code is OLD.
- Interactivity is limited to what is scripted by the user.
- Everything is completely script driven.
- Uses Motif, which is free -- as long as you use an open-source os.
- There are some known issues with the included MS-Windows driver.
- Summary
- PGPLOT is different, in that it is a library and not a package; thus the user must write a script to utilize even the slightest feature. My initial impressions were to dismiss PGPLOT outright, because it is difficult to use, is somewhat prehistoric, and has fallen out of heavy development. However, after perusing some of the unique features PGPLOT provides, it may still be useful.
Gnuplot
Gnuplot (http://www.gnuplot.info) is a portable command-line driven interactive datafile (text or binary) and function plotting utility that was originally intended as graphical program which would allow scientists and students to visualize mathematical functions and data. In addition, Gnuplot serves as non-interactive plotting engine for miscellaneous portable third-party applications, like Octave. Gnuplot supports many different types of outputs terminals and is easily extensible to include new devices.
Gnuplot supports various kinds of plots. In 2D, it can draw line, point, dot, box, histogram graphs or vector fields. In 3D, it supports line, point and dot surfaces, with or without hidden line removal. Gnuplot supports color or grayscale surfaces and maps, even for non-equidistant and non-rectangular 3D data, otherwise it offers data gridding.
Gnuplot-py (http://gnuplot-py.sourceforge.net) (scipy.gplt) is a Python package that interfaces to Gnuplot. Gnuplot.py allows you to use Gnuplot from within Python to plot arrays of data from memory, data files, or mathematical functions. Gnuplot.py has recently been added to SciPy (http://www.scipy.org), and is being integrated with Chaco (http://www.scipy.org/site_content/chaco).
- Strengths
- 2D and 3D plotting
- mapping from 2D to 3D
- limited slicing from 3D to 2D
- color mapping and surface plots
- different plot types can be set for each data set
- 2D and 3D animations
- Weaknesses
- limited point-and-click interactivity
- limited font and text customization
- quality and quantity of output formats
- has math and curve fitting functions, however they are relatively difficulty to use
- functionallity is limited when using multiple plots on one canvas
- Summary
- Gnuplot has a little of everything. It has the ability to do select types of 2D and 3D plots, mappings, and animations. The python bindings are very well done, and only lack some of the new mouse functionallity introduced in the latest version of Gnuplot.
