Customizing your scatter plot: Refine
This tutorial describes how to customize a scatter plot in Datawrapper. We assume that you have already uploaded your dataset into Datawrapper and selected the scatter plot chart. You can now refine your chart in the "Refine" tab in step 3: Visualize. (If you're looking for an explanation of features in the "Annotate" step, go to this article.)
In any tab of step 3: Visualize, you can click, hold, and drag the arrow in the lower right corner to scale the chart window or manually determine the dimension of the chart by entering values in the boxes below the chart ("Resize to"). We recommend to do this step first, but you can change the size of your chart at any point.
Customizing the axes: x-Axis & y-Axis
In the "Refine" tab, we see six panels. The first two panels let us customize your axes. Here we can choose which element in your chart shows which data:
- "select column": Select the column header that you want to These labels are in your category-column. We'll choose the column "GDP per capita" for our x-Axis and "Life expectancy" for our y-Axis.
- "customize": Here you can select a custom range: Should our chart start at zero? Then you want to enter a "0" in the "min" field.
We can also enter custom ticks. E.g. if we only type in a "50,100" in this field, our y-axis will only display the ticks at the "50" and the "100" position. Without entering the range and custom ticks, Datawrapper will adjustboth automatically.
At the end of the "customize" line, you'll find the option to transform your linear scale into a logarithmic scale. That make sense in our case for the GDP per capita, so we check the "log" checkbox.
- "format": We can now define how our values should be displayed, with how many decimal places, for example. Our GDP numbers are really high, so we can shorten them: Let's choose the format "123k" to get a "8000" be displayed as "8k" and a "1000000" be displayed as "1m".
- "position": Here we can define the position of our axes. The default is "bottom" for the x-axis and "left" for the y-axis, but you can play around with this setting to see if another axis will be a better choice for your axis. For our chart, we will keep the default settings.
- "grid": Do we want to display the grid or not? Or do we want to display the grid but not the axis labels? Or the other way round? We can make these decisions here. For our chart, we again go with the default, "on".
For our chart, the panel looks like this at the end:
In this panel, we can choose the colors for our dots. We can either assign one color for all dots, or "select column" to choose colors for a whole group of dots. This column we select should be a category column: In our case, that's "continent". Depending on the continent a country is on, we want to give it different colors:
If we tick "show color key", the chart will get a color legend above the chart. We can enter own key labels:
If we have many overlapping dots, we should also change the symbol opacity or tick the checkbox "show outlines".
In the "Size" panel, we can change the size of our dots. Our dots can all have the same size ("fixed size"), or we can select a column again to give each dot an individual size ("variable"). This time, the column we choose needs to have numeric values. In our case, we choose the column "Population".
Once we choose a column, we can still adjust the size and can define which size our biggest dot should have (" max size").
Next, we can decide if our dots should not be dots at all – but triangles, for example, or crosses. Once again we can make this decision for all dots ("fixed size") or make it depended on a variable and select this column. Like with color, this column needs to have categories, not numeric values. We don't use this feature in our chart, but could choose the "continent" column.
In the last panel of "Refine", we can decide if our scatter plot should have a trend line or not. A trend line is a great for showing a correlation in our data. If our dots are scattered all over the chart, a trend line is useless – but in our chart, we do have a tight relationship between our labels. Since we chose a log scale for our y-axis, we should choose a logarithmic trend line:
These are all the options you can find in the Refine tab. Let's move on to the Annotate tab. Here you'll find five more options to extend your chart. We wrote an extra tutorial about these features: "Customizing your scatter plot: Annotate"