The Grammar of Graphics (eBook)
XVIII, 691 Seiten
Springer New York (Verlag)
978-0-387-28695-2 (ISBN)
Presents a unique foundation for producing almost every quantitative graphic found in scientific journals, newspapers, statistical packages, and data visualization systems
The new edition features six new chapters and has undergone substantial revision.
The first edition has sold more than 2200 copies.
Four color throughout.
Preface to First Edition Before writing the graphics for SYSTAT in the 1980's, I began by teaching a seminar in statistical graphics and collecting as many different quantitative graphics as I could find. I was determined to produce a package that could draw every statistical graphic I had ever seen. The structure of the program was a collection of procedures named after the basic graph types they p- duced. The graphics code was roughly one and a half megabytes in size. In the early 1990's, I redesigned the SYSTAT graphics package using - ject-based technology. I intended to produce a more comprehensive and - namic package. I accomplished this by embedding graphical elements in a tree structure. Rendering graphics was done by walking the tree and editing worked by adding and deleting nodes. The code size fell to under a megabyte. In the late 1990's, I collaborated with Dan Rope at the Bureau of Labor Statistics and Dan Carr at George Mason University to produce a graphics p- duction library called GPL, this time in Java. Our goal was to develop graphics components. This book was nourished by that project. So far, the GPL code size is under half a megabyte.
Preface 7
Contents 13
1 Introduction 17
1.1 Graphics Versus Charts 18
1.2 Object-Oriented Design 19
1.2.1 What is OOD? 19
1.2.2 What is not OOD? 20
1.2.3 Why OOD? 21
1.3 An Object-Oriented Graphics System 22
1.3.1 Specification 22
1.3.2 Assembly 23
1.3.3 Display 23
1.4 An Example 24
1.4.1 Specification 25
1.4.2 Assembly 25
1.4.3 Display 26
1.4.4 Revision 27
1.5 What This Book Is Not 29
1.5.1 Not a Command Language 29
1.5.2 Not a Taxonomy 30
1.5.3 Not a Drafting Package 30
1.5.4 Not a Book of Virtues 31
1.5.5 Not a Heuristic System 32
1.5.6 Not a Geographic Information System 33
1.5.7 Not a Visualization System 33
1.6 Background 34
1.7 Sequel 34
Part I 37
2 How To Make a Pie 39
2.1 Definitions 41
2.1.1 Sets 41
2.1.2 Relations 43
2.1.3 Functions 43
2.1.4 Graphs 44
2.1.5 Compositions 44
2.1.6 Transformations 45
2.1.7 Algebras 45
2.1.8 Variables 45
2.1.9 Varsets 46
2.1.10 Frames 46
2.2 Recipe 47
2.2.1 Create Variables 47
2.2.2 Apply Algebra 48
2.2.3 Apply Scales 49
2.2.4 Compute Statistics 50
2.2.5 Construct Geometry 50
2.2.6 Apply Coordinates 51
2.2.7 Compute Aesthetics 52
2.3 Notation 54
2.3.1 Specifications 54
2.3.2 Functions 56
2.4 Sequel 56
3 Data 57
3.1 Data Functions 58
3.2 Empirical Data 60
3.2.1 Reshaping Data 61
3.2.2 Bootstrapping 63
3.3 Abstract Data 64
3.3.1 Time Series 64
3.3.2 Counts 65
3.4 Metadata 67
3.5 Data Mining 67
3.5.1 MOLAP 68
3.5.2 ROLAP 69
3.5.3 Visual Query of Databases 70
3.6 Sequel 70
4 Variables 71
4.1 Transforms 72
4.2 Examples 73
4.2.1 Sorting 73
4.2.2 Probability Plots 74
4.2.3 Aggregating Variables 75
4.2.4 Regression Residuals 76
4.3 Sequel 77
5 Algebra 79
5.1 Syntax 79
5.1.1 Symbols 79
5.1.2 Operators 79
5.1.3 Rules 84
5.2 Examples 89
5.2.1 Cross 89
5.2.2 Nest 91
5.2.3 Blend 92
5.3 Other Algebras 96
5.3.1 Design Algebra 96
5.3.2 Relational Algebra 96
5.3.3 Functional Algebra 98
5.3.4 Table Algebra 99
5.3.5 Query Algebra 99
5.3.6 Display Algebra 99
5.4 Sequel 99
6 Scales 101
6.1 Scaling Theory 101
6.1.1 Axiomatic Measurement 101
6.1.2 Unit Measurement 102
6.1.3 Applied Scaling 105
6.1.4 Graphics and Scales 108
6.2 Scale Transformations 109
6.2.1 Categorical Scales 110
6.2.2 Linear Scales 111
6.2.3 Time Scales 114
6.2.4 One-bend Scales 116
6.2.5 Two-bend Scales 121
6.2.6 Probability Scales 124
6.3 Sequel 125
7 Statistics 127
7.1 Methods 129
7.1.1 Bin 130
7.1.2 Summary 131
7.1.3 Region 131
7.1.4 Smooth 131
7.1.5 Link 134
7.1.6 Conditional and Joint Methods 135
7.1.7 Form and Function 136
7.2 Examples 139
7.2.1 Point 139
7.2.2 Line/Surface 141
7.2.3 Interval 147
7.2.4 Bins 149
7.2.5 Polygon 156
7.2.6 Path 160
7.2.7 Edge 161
7.3 Summary 168
7.4 Sequel 170
8 Geometry 171
8.1 Examples 174
8.1.1 Functions 174
8.1.2 Partitions 184
8.1.3 Networks 187
8.1.4 Collision Modifier Examples 188
8.1.5 Splitting vs. Shading 192
8.2 Summary 193
8.3 Sequel 194
9 Coordinates 195
9.1 Transformations of the Plane 196
9.1.1 Isometric Transformations 199
9.1.2 Similarity Transformations 207
9.1.3 Affine Transformations 208
9.1.4 Planar Projections 212
9.1.5 Conformal Mappings 217
9.1.6 Polar Coordinates 221
9.1.7 Inversion 232
9.1.8 Bendings 233
9.1.9 Warpings 239
9.2 Projections onto the Plane 243
9.2.1 Perspective Projections 244
9.2.2 Stereo Pairs 248
9.2.3 Triangular (Barycentric) Coordinates 251
9.2.4 Map Projections 254
9.3 3D Coordinate Systems 260
9.3.1 Spherical Coordinates 260
9.3.2 Triangular-Rectangular Coordinates 261
9.3.3 Cylindrical Coordinates 262
9.4 High-Dimensional Spaces 264
9.4.1 Projection 264
9.4.2 Sets of Functions. 266
9.5 Tools and Coordinates 269
9.6 Sequel 270
10 Aesthetics 271
10.1 Continuous Scales 272
10.1.1 Psychophysics 272
10.1.2 Consequences for Attributes 274
10.2 Categorical Scales 277
10.2.1 Innate Categories 277
10.2.2 Learned Categories 279
10.2.3 Scaling Categories 279
10.2.4 Consequences for Attributes 280
10.3 Dimensions 281
10.3.1 Integral Versus Separable Dimensions 281
10.4 Realism 286
10.5 Aesthetic Attributes 290
10.5.1 Position 293
10.5.2 Size 293
10.5.3 Shape 297
10.5.4 Rotation 298
10.5.5 Resolution 299
10.5.6 Color 300
10.5.7 Texture 304
10.6 Examples 309
10.6.1Position 309
10.6.2 Size 310
10.6.3 Shape 312
10.6.4 Rotation 322
10.6.5 Resolution 323
10.6.6 Color 324
10.7 Summary 332
10.8 Sequel 334
11 Facets 335
11.1 Facet Specification 335
11.2 Algebra of Facets 336
11.3 Examples 343
11.3.1 One-Way Tables of Graphics 343
11.3.2 Multi-way Tables 345
11.3.3 Continuous Multiplots 352
11.3.4 Scatterplot Matrices (SPLOMs) 353
11.3.5 Facet Graphs 354
11.3.6 Multiple Frame Models 360
11.4 Sequel 361
12 Guides 363
12.1 Scale Guides 364
12.1.1 Legends 364
12.1.2 Axes 366
12.1.3 Scale Breaks 367
12.1.4 Double Axes 368
12.2 Annotation Guides 368
12.2.1 Text 369
12.2.2 Form 370
12.2.3 Image 371
12.3 Sequel 372
Part 2 374
13 Space 375
13.1 Mathematical Space 379
13.1.1 Topological Space 379
13.1.2 Connected and Disconnected Space 380
13.1.3 Metric Space 380
13.1.4 Maps 382
13.1.5 Embeddings 382
13.1.6 Multidimensional Scaling 383
13.1.7 Geodesics 384
13.1.8 Dimensions 385
13.1.9 Connected Spaces 386
13.1.10 Fractals 389
13.1.11 Discrete Metric Spaces 392
13.1.12 Graph-Theoretic Space 393
13.2 Psychological Space 394
13.2.1 Spatial Models of Pre-attentive Processes 394
13.2.2 Spatial Models of Cognitive Processes 396
13.2.3 Spatial Cognition 397
13.3 Graphing Space 397
13.3.1 Mapping Connected Space to Euclidean Space 398
13.3.2 Mapping Discrete Space to Euclidean 405
13.3.3 Mapping Graph-Theoretic Space to Euclidean 408
13.3.4 Mapping Nested Space to Euclidean 415
13.4 Sequel 421
14 Time 423
14.1 Mathematics of Time 424
14.1.1 Deterministic Models of Time 424
14.1.2 Stochastic Models of Time 430
14.1.3 Chaotic Models of Time 434
14.2 Psychology of Time 440
14.2.1 Sensation 440
14.2.2 Duration 441
14.2.3 Motion 442
14.3 Graphing Time 443
14.3.1 Static Graphics 443
14.3.2 Dynamic Graphics 451
14.3.3 Real-Time Graphics 453
14.4 Sequel 465
15 Uncertainty 467
15.1 Mathematics of Uncertainty 467
15.1.1 Defining Uncertainty 468
15.1.2 Defining Probability 469
15.1.3 Bayes’ Theorem 470
15.1.4 The Central Limit Theorem 473
15.1.5 Interpreting Probability 474
15.1.6 Uncertainty Intervals 476
15.1.7 Model Error 479
15.1.8 Resampling 480
15.1.9 Missing Data 480
15.2 482
15.3 Graphing Uncertainty 484
15.3.1 Aesthetics 484
15.3.2 Uncertainty Intervals 493
15.3.3 Multiple Comparisons 495
15.3.4 Resampling 498
15.3.5 Indeterminacy 499
15.3.6 Missing Values 501
15.4 Sequel 504
16 Analysis 505
16.1 Variance Analysis 506
16.1.1 Cross. 506
16.1.2 507
16.1.3 Blend. 507
16.1.4 Smoothing by Design 507
16.1.5 An Example 509
16.2 Shape Analysis 512
16.3 Graph Drawing. 516
16.3.1 Networks 516
16.3.2 Trees 517
16.3.3 Directed Graphs 519
16.4 Sequence Analysis 521
16.4.1 Identifying Numeric Sequences 523
16.4.2 Finding Sequences in Strings 527
16.4.3 Comparing Sequences 530
16.4.4 Critical Paths 531
16.5 Pattern Analysis 533
16.5.1 Matrix Permutation 533
16.5.2 Canonical Data Patterns 534
16.5.3 Permuting Randomly 540
16.5.4 Permuting Systematically 541
16.5.5 Summary 548
16.6 Sequel 549
17 Control 551
17.1 Building 551
17.1.1 Procedural Languages 552
17.1.2 Object-Based Languages 553
17.1.3 Dialog Boxes 554
17.1.4 Wizards 555
17.1.5 Graphboard 555
17.2 Exploring 568
17.2.1 Filtering 568
17.2.2 Navigating 571
17.2.3 Manipulating 577
17.2.4 Brushing and Linking 579
17.2.5 Animating 584
17.2.6 Rotating 585
17.2.7 Transforming 586
17.3 Sequel 593
18 Automation 595
18.1 Graphics Production Language 596
18.1.1 Examples 599
18.1.2 GPL Development Environment 605
18.2 Visualization Markup Language 605
18.2.1 Data Definition 608
18.2.2 Structure 609
18.2.3 Style 611
18.2.4 Levels of Specification 613
18.2.5 Default Settings 614
18.2.6 Locales 615
18.2.7 Extensibility 616
18.2.8 Comparison with Other XMLs 622
18.2.9 GraphML 624
18.3 Summary 624
18.4 Sequel 625
19 Reader 627
19.1 The Problem 628
19.2 A Psychological Reader Model 630
19.3 A Graphics Grammar Reader Model 633
19.4 Research 638
19.5 Sequel 638
20 Coda 639
20.1 Napoleon’s March 639
20.1.1 The Data 639
20.1.2 The Graphic 642
20.1.3 The Meaning 645
20.2 Monarch Butterfly Migration 645
20.2.1 The Data 646
20.2.2 The Graphic 646
20.2.3 The Meaning 648
20.3 Conclusion 648
20.3.1 The Grammar of Graphics 649
20.3.2 The Language of Graphics 650
20.4 Sequel 650
References 651
Author Index 689
Subject Index 697
7 Statistics (p.111-112)
Statistics state the status of the state. All these s words derive from the Greek statis and Latin status, or standing. Standing (for humans) is a state of being, a condition that represents literally or figuratively the active status of an individual, group, or state. Modern statistics as a discipline arose in the early 18th century, when collection of data about the state was recognized as essential to serving the needs of its constituents. This Enlightenment perspective gave rise not only to the modern social sciences, but also to mathematical methods for analyzing data measured with error (Stigler, 1983).
In a graphical system, statistics are methods that alter the position of geometric graphs. We are accustomed to think of a chart as a display of a statistic or a statistical function (e.g., a bar chart of budget expenditures). As such, it would seem that we should begin by aggregating data, computing statistics, and drawing a chart. This would be wrong, however. By putting statistics under control of graphing functions, rather than whole charts under the control of statistics, we accomplish several things. First, we can represent more than one statistic in a frame. One graphic can represent a mean and another a median, in the same frame. Second, making statistics into graphing methods forces them to be views or summaries of the raw data rather than data themselves. In other words, the casewise data and a graphic are inextricably bound because we never break the connection between the variables and the graphics that represent them.
This allows us to drill-down, brush, and investigate values with other dynamic tools. This functions would be lost if we pre-aggregated the data. Finally, by putting statistics under the control of graphing functions, we can modularize and localize computations in a distributed system. Adding graphics to a frame is easy when we do not have to worry about the structure of the data and how aggregations were computed. We will return to this issue in Section 7.3 at the end of this chapter.
The simplest graphing method is the one students first learn for plotting algebraic functions: for every x, compute f(x) so that one may draw a graph based on the tuples of the form (x, f(x)) that comprise the graph. Students learn to construct a list of these tuples (a finite subset of the graph of the function) in order to plot selected points in Cartesian coordinates. In the functional no tation of this book, students usually draw graphs of algebraic functions using the graphing function line(position(f()).
While students learn graphing methods for polynomial and other simple algebraic functions, most charts are based on statistical functions of observed values of one or more variables. In our notation, examples of statistical graphs are produced by the functions
point(position(summary.mean())) and
line(position(smooth.linear())),
which implement the statistical graphing functions summary.mean() and smooth.linear(), respectively. Statistical functions can be complicated, but their output looks the same to their geometric clients as the output of algebraic functions. A line does not care who produced the points it needs to plot itself.
Erscheint lt. Verlag | 28.1.2006 |
---|---|
Reihe/Serie | Statistics and Computing | Statistics and Computing |
Co-Autor | D. Wills, D. Rope, A. Norton, R. Dubbs |
Zusatzinfo | XVIII, 691 p. |
Verlagsort | New York |
Sprache | englisch |
Themenwelt | Mathematik / Informatik ► Informatik ► Grafik / Design |
Mathematik / Informatik ► Mathematik ► Computerprogramme / Computeralgebra | |
Mathematik / Informatik ► Mathematik ► Statistik | |
Mathematik / Informatik ► Mathematik ► Wahrscheinlichkeit / Kombinatorik | |
Technik | |
Schlagworte | Data Visualization • Geometry • presentation • statistical software • Visualization |
ISBN-10 | 0-387-28695-0 / 0387286950 |
ISBN-13 | 978-0-387-28695-2 / 9780387286952 |
Haben Sie eine Frage zum Produkt? |
![PDF](/img/icon_pdf_big.jpg)
Größe: 14,5 MB
DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasserzeichen und ist damit für Sie personalisiert. Bei einer missbräuchlichen Weitergabe des eBooks an Dritte ist eine Rückverfolgung an die Quelle möglich.
Dateiformat: PDF (Portable Document Format)
Mit einem festen Seitenlayout eignet sich die PDF besonders für Fachbücher mit Spalten, Tabellen und Abbildungen. Eine PDF kann auf fast allen Geräten angezeigt werden, ist aber für kleine Displays (Smartphone, eReader) nur eingeschränkt geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.
Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich