Grammar of Graphics
Grammar of Graphics
Supported by:
ggplot2 AntV G2
Layered
Grammar
Hadley
Wickham
Graph vs.
Graphics
Graph is an abstract
entity of points and it is
unperceivable.
Graphics are
what we can
see.
Deep
Structure
Surface
Structure
Why Deep Structure theory in
graphics?
Making Graphics Is All
About
Specify Assemble Display
Six specification statements
1. DATA
2. TRANS
3. SCALE
4. COORD
5. ELEMENT
6. GUIDE
ASSEMBLY
Is a relationship Has a relationship
Pipeline of Graphing
Variable
X=[ O, V, f ]
X is a variable
O is set of objects
F is mapping f:O V
Varset
X = [ V, Õ, f]
V = Values
Õ = Bag of Objects
f:V Õ
Data
1. Empirical Data
Realist, Nominalist, Operationalist
1. Abstract Data
Time Series, Counts
1. Meta Data
Time Series
Counts
Variable Transformations
Mathematical Statistical Multivariate
* / +
Example
A rural school has three grades 5,6,7.
Grade 5: 5A 5B
Grade 6: 6A 6B 6C
Grade 7: 7A 7B 7C
Data
Students are objects.
Each student has a grade
class and marks.
Student1
Grade 6 Class A
Marks1 35 Marks2 40
VARSETS
Grades = [ {5,6,7} , {students}, f1 ]
Class = [ {A,B,C}, {students} , f2 ]
Marks1 = [ {marks1} , {students}, f3 ]
Marks2 = [ {marks2} , {students}, f3 ]
CROSS
Nest
Cross & Nest
5 6 7
A 15 16 10
B 20 25 25
C 0- 20 30
Blend
Scales
Psychophysicist S.S.
Stevens initiate axiomatic
scale theory
F : Bm Rn
Collision Modifiers
Stack
Dodge
Jitter
Coordinates
Cartesian
Polar
Spherical
Cylindrical
Aesthetic
Gustav Fechner introduced
concept of Just Noticeable
Difference (JND)
Categories
Innate
Or
Learned?
Innate Categories
Prototype Theory
Vs
Exemplar theory
Realism of
Categories
James G. Gibson said
we should first consider
environmental
constancies of the
perceiving interaction.