Loon: An Interactive Statistical Visualization Toolkit

Introduction

All of loon's displays have plot states. Plot states specify what is displayed, how it is displayed and if and how the plot is linked with other loon plots. loon's plot states are derived from Tk's configurable options. A large part of loon's framework revolves around modifying states, tracking state changes and the synchronization of plot states between plots.

For example, the plot states of the scatterplot display include x, y, color, size, selected, xlabel, ylabel, zoomX, zoomY, panX, panY, showScales and showGuides. The scatterplot display has more than 30 states.

To get a complete list of the plot states for a particular loon widget use the info states widget subcommand

set p [plot -x {1 2 3} -y {3 2 1}]

$p info states
$p info states x
$p info states {x y xTemp}

When possible then the data structure for each state is either a scalar or a flat list. One exception is the data state which contains a dict.

Query and Modify

To query a state, say showScales, of the plot p use

p['showScales']
l_cget(p, 'showScales')

$p cget -showScales

To modify a single or multiple states use one the configure subcommand

$p configure -showScales TRUE -showLabels TRUE

State Dimension

The dimension of a state is either explicit, i.e. a number, or abstract, i.e. a letter.