Heuristic: use the aspect ratio that results in an average line slope of 45°.
Cleveland, William S., Marylyn E. McGill, and Robert McGill. “The shape parameter of a two-variable graph.” Journal of the American Statistical Association 83.402 (1988): 289-300.
Edward Tufte, The Visual Display of Quantitative Information, Cheshire, CT, Graphics Press, 2001, 2e éd. (1re éd. 1983)
Lie factor :
\[\textrm{Lie factor} = \frac{783}{53} = 14.8\]
Edward Tufte, The Visual Display of Quantitative Information, Cheshire, CT, Graphics Press, 2001, 2e éd. (1re éd. 1983)
Lie factor : 9.4
Edward Tufte, The Visual Display of Quantitative Information, Cheshire, CT, Graphics Press, 2001, 2e éd. (1re éd. 1983)
Sachant que l’aire de la tranche “apple”" (en vert) est proportionelle à \(2.22\,cm^2\) et celle correspondant à rim (en bleue) est proportionelle à \(2.96\,cm^2\) calculer le lying factor ?
Perception
\[S = I^p\]
Principes :
Augmenter la densité de données
\[\textrm{graph data density} = \frac{\textrm{number of entries in data matrix}}{\textrm{area of data display}}\]
Data density :
Eviter les graphique à faible densité
Edward Tufte, The Visual Display of Quantitative Information, Cheshire, CT, Graphics Press, 2001, 2e éd. (1re éd. 1983)
Data density :
Meilleure densité de donnée
Edward Tufte, The Visual Display of Quantitative Information, Cheshire, CT, Graphics Press, 2001, 2e éd. (1re éd. 1983)
##Bonnes pratiques :
éviter de mentir !
faire des graphiques riches
avec des encodages adaptés
de bonnes échelles, (!couleurs, !aires)
des axes labelisés
ordre des facteurs
aspect ratio
format d’enregistrements pdf, svg // png,jpg
ggplot
gg = grammar of graphics
“The Grammar of Graphics” (Wilkinson, Annand and Grossman, 2005)
grammaire → même type de description pour des graphique différents
ggplot
Composants de la grammaires :
data and aesthetic mappings, ex : f(data) → x position, y position, size, shape, color
geometric objects, ex : points, lines, bars, texts
scales, ex : f([0, 100]) → [0, 5] px
facet specification, ex : segmentation des données suivant un ou plusieurs facteurs
statistical transformations, ex : moyenne, comptage, régression
the coordinate system.
ggplot
Création d’un graphique :
ajout successif de layers (calques)
définissant un mapping des données vers leurs représentation
(+ optionel) définition de transformations statistique
(+ optionel) définition des échelles
(+ optionel) gestion du thème des titre …
! Données toujours sous forme de data.frame bien formatées
ggplot, géométries
Création d’un graphique :
ajout successif de layers (calques)
+geom_line()
définissant un mapping des données vers leurs représentation