Building Plotting Applications with Chaco

Outline

What is Chaco?

Plot application toolkit for Python

Sample plotting applications

  • batch plotting of data (csv -> png)
  • display for realtime data acquisition
  • visual editor for adjusting inputs to simulations
  • math/function explorer
  • mapping and GIS applications
  • visual plot construction kit (wxDesigner, C++ builder)

Chaco Features

  • Plots as compositions of distinct visual components
    • Container model
    • Layout
    • Event model
  • Built-in mechanisms for rendering layers, backbuffering
  • Modular and extensible architecture
  • Vector drawing engine

What Chaco Isn't

What Chaco Isn't

mydata = read_some_data()

plot(mydata)

Actually...

I lied.

Tutorial

Slides from tutorial session at SciPy 2006 conference are on the web, and still relevant: http://code.enthought.com/chaco/scipy06/chaco_talk.html

Data-oriented objects

AbstractDataSource
  ArrayDataSource
  GridDataSource
  ImageData

AbstractDataRange
  BaseDataRange
     DataRange1D
     DataRange2D

AbstractMapper 
  Base1DMapper  
    LinearMapper 
    LogMapper
    PolarMapper
  GridMapper

Renderers

Everything basically subclasses from PlotComponent, so it's not on this list.

AbstractPlotRenderer
  BaseXYPlot
    BarPlot
    LinePlot
    ScatterPlot
      ColormappedScatterPlot

  Base2DPlot
    ImagePlot
      CmapImagePlot
    ContourLinePlot
    ContourPolyPlot

Other graphical components

BasePlotContainer
  OverlayPlotContainer
  HPlotContainer
  VPlotContainer

AbstractOverlay
  PlotAxis
  PlotGrid
  Legend
  LassoOverlay
  PlotLabel
  RangeSelectionOverlay
  Tooltip
  ColormappedSelectionOverlay

Tools and Interactors

BaseTool
  DataPrinter
  DragTool
    LegendTool
    MoveTool
  DrawPointsTool
  LassoSelection
  PanTool
  RangeSelection
  ToolHistoryMixin
    SimpleZoom

How to get it

http://code.enthought.com/chaco/download.shtml

Windows users: Get Enthon, it will be much easier. Now with Eggs!
http://code.enthought.com/enstaller/eggs/

Mac users: Read Robert's guide on installing the whole Scipy + Numpy + VTK + ETS + Matplotlib + ... stack:
https://svn.enthought.com/enthought/wiki/IntelMacPython25

Linux users: Should be straightforward, read the wiki for detailed instructions:
https://svn.enthought.com/enthought/wiki/GrabbingAndBuilding

Links

http://code.enthought.com/chaco

Mailing Lists:

chaco-users@enthought.com

envisage-dev@enthought.com
	

Slides for this talk are on the web at:
http://code.enthought.com/chaco/pycon07