| Dataset | Variable | Mean | SD | Min | Max |
|---|---|---|---|---|---|
| 1 | x | 9.0 | 3.3 | 4.0 | 14.0 |
| 2 | x | 9.0 | 3.3 | 4.0 | 14.0 |
| 3 | x | 9.0 | 3.3 | 4.0 | 14.0 |
| 4 | x | 9.0 | 3.3 | 8.0 | 19.0 |
| 1 | y | 7.5 | 2.0 | 4.3 | 10.8 |
| 2 | y | 7.5 | 2.0 | 3.1 | 9.3 |
| 3 | y | 7.5 | 2.0 | 5.4 | 12.7 |
| 4 | y | 7.5 | 2.0 | 5.2 | 12.5 |
Why graphs?
| Dataset | Variable | Mean | SD | Min | Max |
|---|---|---|---|---|---|
| 1 | x | 9.0 | 3.3 | 4.0 | 14.0 |
| 2 | x | 9.0 | 3.3 | 4.0 | 14.0 |
| 3 | x | 9.0 | 3.3 | 4.0 | 14.0 |
| 4 | x | 9.0 | 3.3 | 8.0 | 19.0 |
| 1 | y | 7.5 | 2.0 | 4.3 | 10.8 |
| 2 | y | 7.5 | 2.0 | 3.1 | 9.3 |
| 3 | y | 7.5 | 2.0 | 5.4 | 12.7 |
| 4 | y | 7.5 | 2.0 | 5.2 | 12.5 |
| Dataset | Intercept | Slope | Correlation |
|---|---|---|---|
| 1 | 3 | 0.5 | 0.82 |
| 2 | 3 | 0.5 | 0.82 |
| 3 | 3 | 0.5 | 0.82 |
| 4 | 3 | 0.5 | 0.82 |
Datasaurus| Dataset | Mean x | Mean y | SD x | SD y | Correlation |
|---|---|---|---|---|---|
| away | 54.27 | 47.83 | 16.77 | 26.94 | -0.06 |
| bullseye | 54.27 | 47.83 | 16.77 | 26.94 | -0.07 |
| circle | 54.27 | 47.84 | 16.76 | 26.93 | -0.07 |
| dino | 54.26 | 47.83 | 16.77 | 26.94 | -0.06 |
| dots | 54.26 | 47.84 | 16.77 | 26.93 | -0.06 |
| h_lines | 54.26 | 47.83 | 16.77 | 26.94 | -0.06 |
| high_lines | 54.27 | 47.84 | 16.77 | 26.94 | -0.07 |
| slant_down | 54.27 | 47.84 | 16.77 | 26.94 | -0.07 |
| slant_up | 54.27 | 47.83 | 16.77 | 26.94 | -0.07 |
| star | 54.27 | 47.84 | 16.77 | 26.93 | -0.06 |
| v_lines | 54.27 | 47.84 | 16.77 | 26.94 | -0.07 |
| wide_lines | 54.27 | 47.83 | 16.77 | 26.94 | -0.07 |
| x_shape | 54.26 | 47.84 | 16.77 | 26.93 | -0.07 |
Source: The datasauRus package
Three layers of a graph, geometric objects, scales and coordinates and annotations of the plot
Three layers of a graph put together, geometric objects, scales and coordinates and annotations of the plot
ggplot2 - Grammar of graphicsdata → The dataset containing variables to plotaesthetics → Scales where the data are mappedgeometries → Geometric representations of the datafacet → A part of the datasetstatistical transformations → Summaries of datacoordinates → The coordinate spacethemes → Plot components not linked to datatheme())A continuous variable displayed in a Histogram and Density plot
Comparison of a continous variable between categories using summary graphics
Comparison of a continous variable between categories using summary graphics
Comparison of a continous variable between categories using raw data and summaries
Highlighting relationships, raw data and summaries