Dynamic and Interactive Graphics in Lisp-Stat

Similar documents
Extending Arc. Sanford Weisberg. School of Statistics, University of Minnesota, St. Paul, MN

Enhancing dynamic graphical analysis with the Lisp-Stat language and the ViSta statistical program

ViSta THE L.L. THURSTONE PSYCHOMETRIC LABORATORY UNIVERSITY OF NORTH CAROLINA. Developing Statistical Objects. Forrest W. Young

Generalized Linear Models in Lisp-Stat. Luke Tierney. September 1994

Principles of Programming Languages, 2

iplots extreme Next-generation interactive graphics for analysis of large data Simon Urbanek AT&T Labs Statistics Research

0LispWorks CAPI Reference Manual. Version 4.1

Chapter 1. Introduction

IMPSTAR 2.1 User s Guide

Making the Transition from R-code to Arc

Linked Data Views. Introduction. Starting with Scatterplots. By Graham Wills

Nonparametric Kernel Smoothing Methods. The sm library in Xlisp-Stat.

Object Oriented Programming (OOP)

PDFill: PDF Commenting or Annotation

WPF. Source Module 01: Lesson1

BAYES-LIN: An object-oriented environment for Bayes linear local computation

Features and Benefits

Common LISP-Introduction

Section 33: Advanced Charts

Chapter Eight: Contents

Interactive Graphics for Statistics

Trellis Displays. Definition. Example. Trellising: Which plot is best? Historical Development. Technical Definition

THE L.L. THURSTONE PSYCHOMETRIC LABORATORY UNIVERSITY OF NORTH CAROLINA. Forrest W. Young & Carla M. Bann

Problems 3-1, 3.3, 3.4 and 3.5 in Chapter 3 of Winston and Horn's LISP (see Below)

Points Lines Connected points X-Y Scatter. X-Y Matrix Star Plot Histogram Box Plot. Bar Group Bar Stacked H-Bar Grouped H-Bar Stacked

Lesson 18-1 Lesson Lesson 18-1 Lesson Lesson 18-2 Lesson 18-2

Common LISP Tutorial 1 (Basic)

*.lsp Commands: + - * / setq setvar getvar getpoint defun command getstring appload vlide

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Working with Microsoft Excel. Touring Excel. Selecting Data. Presented by: Brian Pearson

Modern Programming Languages. Lecture LISP Programming Language An Introduction

8. MINITAB COMMANDS WEEK-BY-WEEK

Volume Profile Indicator Pro Version

Part I, Chapters 4 & 5. Data Tables and Data Analysis Statistics and Figures

FUNKCIONÁLNÍ A LOGICKÉ PROGRAMOVÁNÍ 4. LISP: PROMĚNNÉ, DALŠÍ VLASTNOSTI FUNKCÍ, BLOKY, MAPOVACÍ FUNKCIONÁLY, ITERAČNÍ CYKLY,

BD CellQuest Pro Analysis Tutorial

A Brief Introduction to Common Lisp

Click the buttons in the interactive below to become familiar with the drawing tool's commands.

2. Reasons for implementing clos-unit

ENVI Classic Tutorial: 3D SurfaceView and Fly- Through

Quality and Six Sigma Tools using MINITAB Statistical Software: A complete Guide to Six Sigma DMAIC Tools using MINITAB

Introduction to Minitab 1

4. In the Change Chart Type dialog box, click the type of chart to which you want to change. 5. Click the chart style. 6. Click OK.

Parallel Coordinates ++

Sharing Interactive Web Reports from JMP

Statistics 528: Minitab Handout 1

Microsoft Word for Report-Writing (2016 Version)

Gnuplot. in Action. Understanding Data with Graphs MANNING. (74 w. long.) PHILIPP K. JANERT. Greenwich

LEARNING TO PROGRAM WITH MATLAB. Building GUI Tools. Wiley. University of Notre Dame. Craig S. Lent Department of Electrical Engineering

(defvar *state* nil "The current state: a list of conditions.")

CMB - Helmholtz Zentrum München. ivun 1.1. Case Study Tutorial. Jan Hasenauer,

In Minitab interface has two windows named Session window and Worksheet window.

Getting Started with JMP at ISU

CLIM 2.0 Release Notes and Installation Guide. Overview of CLIM 2.0. CLIM 2.0 is a new release of CLIM whose primary goal is to provide support for

Introduction to Form Controls

Intro to Stata for Political Scientists

Chapter 11 Running the Model

Robot Programming with Lisp

Designing a track in Adams/Car:

Facet: Multiple View Methods

CLIP - A Crytographic Language with Irritating Parentheses

Symbols are more than variables. Symbols and Property Lists. Symbols are more than variables. Symbols are more than variables.

Maple Quick Start. Maplesoft, a division of Waterloo Maple Inc.

GeoGebra. 10 Lessons. maths.com. Gerrit Stols. For more info and downloads go to:

Translation To translate an object we have to set up a translation matrix. We can enter this in matrix [B]

ONLINE TUTORIAL T1: TEXT MINING PROJECT

How to Download Data from the Bloomberg Terminal

Parsing INI Files in Lisp

Instructor Info: Dave Tucker, LSSMBB ProModel Senior Consultant Office:

Translation To translate an object we have to set up a translation matrix. We can enter this in matrix [B]

Bar Charts and Frequency Distributions

The same procedure is used for the other factors.

Allegro CL Certification Program

2. Click the From Beginning command in the Start Slide Show group to start the slide show with the first slide.

An Introduction to Minitab Statistics 529

7. Apply a Range of Table Features

Lead Your e-classes Session v8.2

LISP-STAT. and Dynamic Graphics. An Object-Oriented Environment for Statistical Computing LUKE TIERNBY JOHN WILEY & SONS

Introduction 2 Lisp Part III

Object oriented programming

CS 480. Lisp J. Kosecka George Mason University. Lisp Slides

Making Science Graphs and Interpreting Data

For more info and downloads go to: Gerrit Stols

Minitab 17 commands Prepared by Jeffrey S. Simonoff

Applied Regression Modeling: A Business Approach

CREATING THE DISTRIBUTION ANALYSIS

LAB 1 INSTRUCTIONS DESCRIBING AND DISPLAYING DATA

This section provides an overview of the features available within the Standard, Align, and Text Toolbars.

CS 5142 Scripting Languages

How to Create a Simple Animation Using MAYA

CADAM Drafting Hints and Tips

Modify Panel. Flatten Tab

Symbolic Programming. Dr. Zoran Duric () Symbolic Programming 1/ 89 August 28, / 89

CAMBRIDGE TECHNOLOGY IN MATHS Year 11 TI-89 User guide

Lecture #5 Kenneth W. Flynn RPI CS

Cl-plplot User Manual

Adobe Photoshop CS6 Voluntary Product Accessibility Template

Basic Commands. Consider the data set: {15, 22, 32, 31, 52, 41, 11}

STATGRAPHICS Sigma Express for Microsoft Excel. Getting Started

How to work. How to work

Transcription:

Dynamic and Interactive Graphics in Lisp-Stat Luke Tierney Department of Statistics & Actuarial Science University of Iowa July 31, 2017 Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 1 / 12

Background This talk describes work in the late 1980s and 1990s for making available basic interactive and dynamic graphics; supporting experimentation and development of new methods. My first exposure to dynamic and interactive graphics was in work of Becker and Cleveland on linked brushing in a scatterplot matrix The ideas were described in Brushing scatterplots (Becker and Cleveland, 1987, Technometrics) Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 2 / 12

Background The hardware used was the ATT Teletype Model 5620 (BLIT) Other efforts at this time used Lisp Machines or high-end Unix workstations, all out of my price range. The Apple Macintosh had become available and was a more cost-effective option. My initial efforts involved developing two simple, stand-alone Macintosh applications for scatterplot brushing and point cloud rotation. Stand-alone tools need external tools for data preparation. The S language, available to a limited number of universities, provided an excellent integrated framework for data analysis and static graphics. Something similar was needed to support dynamic graphics. Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 3 / 12

Background An open source Lisp framework was a convenient choice. I used the XLISP implementation from David Betz, with added Common Lisp features. Some useful features of Lisp: Supports a functional programming style; Macro system for adding new syntax; Easy to modify to support vectorized operations. Easy to develop new object systems. A good exceptional condition handling system; Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 4 / 12

Some Basic Design Features A command line interface (CLI) for interactively expressing computations; Integrating the command line with interactive graphics event processing. Prototype-based object system for graphics and models. Multiple inheritance to support mixin style of programming. Plots represent views on p-dimensional space. Support linear transformations of space. Each plot has its own window/menu. Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 5 / 12

Basic Usage Lisp prefix function call syntax: (log x) (+ 1 2) (* (log x) 2) Defining a variable: (def abrasion-loss (list 372 206 175...)) Summaries: (mean abrasion-loss) (median abrasion-loss) Some plots: (plot-points abrasion-loss tensile-strength) (histogram hardness) Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 6 / 12

Basic Dynamic Graphics Standard plot objects: histogram histogram scatterplot plot-points 3D point cloud spin-plot scatterplot matrix scatterplot-matrix Standard interactions: identification selection/brushing adjusting selection color/symbol linking multiple plots Interactive operations can also be done programmatically. (send p :selection) (send p :selection (< hardness 70)) Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 7 / 12

Custom Animations Kernel density estimate with a slider control: (let* ((s (rseq 20 80 31)) (p (plot-lines (kernel-dens abrasion-loss :points 30 :width (first s)))) (d (sequence-slider-dialog s :action # (lambda (w) (send p :clear :draw nil) (send p :add-lines (kernel-dens abrasion-loss :points 30 :width w)) (pause 2))))) (send p :add-subordinate d)) Slider controls can also be incorporated into a plot as overlays. Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 8 / 12

Customized Interaction New interactions can be created by defining a new mouse mode. The hand rotate mode for spin plots is defined in about 30 lines of code. Response to changes in linked plots can be customized by defining a custom :adjust-screen method. A method to fit a smooth line to the currently highlighted or selected points in a scatterplot: (defmeth p :adjust-screen () (call-next-method) (let ((i (union (send self :points-selected) (send self :points-hilited)))) (send self :clear-lines :draw nil) (if (< 1 (length i)) (let ((x (select x-var i)) (y (select y-var i)) (w (send self :kernel-width))) (send self :add-lines (kernel-smooth x y :width w))) (send self :redraw-content)))) Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 9 / 12

New Plot Types New plot types can be created as new prototypes. A simple example is a parallel coordinates plot. Prototypes can inherit from one or more prototypes. This supports a mixin style of design. A grand tour mixin can be created to change the transformation of the p-dimensional data matrix according to a touring algorithm. A standard tour plot can be constructed from this mixin and a spin plot. A parallel coordinates tour can also be built fro the tour mixin and the parallel coordinates plot. Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 10 / 12

Parallel Coordinates Tour (defproto parallel-tour-proto (angle) () (list tour-mixin parallel-plot-proto)) (defmeth parallel-tour-proto :angle (&optional (val nil set)) (when set (setf (slot-value angle) val)) (slot-value angle)) (send parallel-tour-proto :angle.1) (defmeth parallel-tour-proto :num-tour-variables () (- (send self :num-variables) 1)) (send parallel-tour-proto :slot-value scale-type variable) (defun tour-parallel-plot (data &rest args &key point-labels) (let ((graph (apply # send parallel-tour-proto :new (length data) args))) (if point-labels (send graph :add-points data :point-labels point-labels :draw nil) (send graph :add-points data :draw nil)) (send graph :adjust-to-data :draw nil) graph)) Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 11 / 12

Discussion Some historical constraints: unsettled user interface conventions (mouse buttons, menus,...); limited color range; speed. Some design decisions: new window for every plot; one plot per window Some lessons: integration with a powerful language CLI is very valuable; creating a good set of software bulding blocks is very helpful; being able to switch between language CLI and interaction is very useful (current limitation of shiny approaches); programming callbacks in language is helpful (current limitation of JavaScript approaches) L. Tierney (1990), LISP-STAT: An Object-Oriented Environment for Statistical Computing and Dynamic Graphics, Wiley. http://www.stat.uiowa.edu/~luke/xls/xlispstat/current/ Luke Tierney (U. of Iowa) Lisp-Stat Graphics Baltimore: JSM 2017 12 / 12