3 min.binningdispersion
Hexbins layout is a variation of the scatterplot, grouping points in hexagonal areas. The color of each hexagon represents the number of points in it. We will use it to see how cars distribute according to their power and their cosumption.
GOAL OF THE TUTORIAL: see where most of the cars contained in the dataset aggregate disposing them by Horsepower and Miles per Gallon.
The first step is to copy and paste your data into RAWGraphs. The dataset must contain at least two columns, one for the X Axis (in our case, Power(hp)) and one for the Y Axis (Economy (mpg)).
You can copy and paste the data from the table below:
Otherwise, you can load the data from using the “Try our samples” button then choosing “Cars – Multivariate”.
In few second you should see the green bar saying “406 records in your data have been successfully parsed!”.
After pasting your data, scroll down and select the “hexbin” visual model.
The hexbin layout has two visual variables.
VARIABLE | TYPE | REQUIRED | MULTIPLE | DESCRIPTION |
X Axis | Number, date | Yes | No | The horizontal position of the circles. |
Y Axis | Number, date | Yes | No | The vertical position of the circles. |
Drag and drop the dimensions as following:
In this way we created a dot for each car in the dataset, disposing it on the cartesian plane according according to its Power (hp) and Economy (mpg).
To reach the final results we can customize the visualization with some parameters you can find next to the visualization.
For the hebin the options available are the following:
For the final results we have set the options as following:
OPTION | DESCRIPTION |
Width | Artboard width in pixels |
Height | Artboard height in pixels |
Radius | The radius of the circumscribed circle to the hexagon. |
Set origin at (0,0) | If selected, the scatterplot origin will be set at the zero value for both the axes. If not selected, origin will be set to the minimum value for the two axes. |
color scale | List of uniques values in the dimension mapped as “color”. If set to ordinal, you can set a color for each value. If set to linear, the app will try to find the minimum and maximum value contained in the dimension, and then creating a gradient among those two values. |
For the final results we have set the options as following:
Here is the finished chart. You can export it in svg or png using the download function at the bottom of the page.
"How to create hexagonal binnings (RAWGraphs 1.0)", by RAWGraphs Team. Licensed under CC BY-NC-SA 4.0. Accessed: November 08, 2021, from undefined
Copy to clipboard