~ubuntu-branches/ubuntu/utopic/python-chaco/utopic

« back to all changes in this revision

Viewing changes to docs/introduction.txt

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-06-01 17:04:08 UTC
  • mfrom: (7.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20140601170408-m86xvdjd83a4qon0
Tags: 4.4.1-1ubuntu1
* Merge from Debian unstable. Remaining Ubuntu changes:
 - Let the binary-predeb target work on the usr/lib/python* directory
   as we don't have usr/share/pyshared anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
Introduction
4
 
------------
5
 
 
6
 
Chaco is a toolkit for composing many visualization components into
7
 
interactive, visually appealing data graphics.  It is both a software
8
 
architecture and a collection of visual components.  It also comes bundled
9
 
with a number of example visualizations that can be quickly adapted for
10
 
specific application domains.
11
 
 
12
 
Since interactivity and the model-view-controller model is central to Chaco's
13
 
design, we say that it is a plotting application toolkit.  (Of course, Chaco
14
 
can render static plots as well.)
15
 
 
16
 
Chaco is architected to support interactive data visualization and integration
17
 
into other applications.  Its components are meant to be connected and hooked
18
 
up to data that might be updating in realtime, and its rendering and event
19
 
models are designed to be as responsive as possible.
20
 
 
21
 
Chaco primarily depends on three other Enthought packages: Traits, Enable, and
22
 
Kiva.  Enable is a pure-python visual component canvas.  It has a "backend"
23
 
that translates GUI toolkit-specific events and methods into a generic system.
24
 
Currently only the WX toolkit is supported, but there is an outdated Tk
25
 
backend, and someday there will hopefully be a Qt backend as well.  Enable is
26
 
part of the Enthought Tool Suite.
27
 
 
28
 
Chaco and Enable both use Kiva for rendering.  Kiva is a vector drawing API
29
 
for Python that is similar to Quartz, PDF, and Cairo.  Like Enable, it
30
 
presents a common API across different backends.
31
 
 
32
 
 
33
 
Architecture
34
 
------------
35
 
 
36
 
At the highest level, Chaco classes fall into two broad groups: those that
37
 
mainly deal with data transformation, and those that deal with rendering.
38
 
The first group of data-oriented components is fairly small, but it is
39
 
crucial to the Chaco model.  The latter group of visual components includes
40
 
basically everything that the user sees and interacts with.
41
 
 
42
 
All visual components in Chaco have position, bounds, a place in the
43
 
containment and layout hierarchy, a place in the rendering order, and can
44
 
respond to keyboard and mouse events.  Examples of visual components include
45
 
axes, grids, plot renderers, legends, and tooltip overlays.
46
 
 
47
 
  * Renderers
48
 
  * Tools
49
 
  * Overlays
50
 
 
51
 
The data components in Chaco consist of data sources, ranges, and mappers.
52
 
 
53
 
  * DataSource
54
 
  * DataRange
55
 
  * Mapper
56
 
 
57
 
 
58
 
Structure of a Basic Plot
59
 
-------------------------
60
 
 
61
 
Conceptually, the simplest plot (like a scatter or line plot) consists of some
62
 
dataspace bounds in X and Y, and some corresponding screen space bounds.  In
63
 
Chaco, all components represent their screen space coordinates using the 'bounds'
64
 
and 'position' attributes:
65
 
 
66
 
    position -> [x,y] of the lower left-most point that is part of the component
67
 
    bounds -> [w,h]; the width and height of the component; can be thought of as
68
 
              the number of pixels in the component in a pixel-/raster-based system
69
 
 
70
 
Additional convenience attributes are available:
71
 
    x, y -> equivalent to position[0] and position[1]
72
 
    x2, y2  -> the coordinates of the upper right-most point in the component
73
 
 
74
 
 
75
 
 
76
 
 
77