Customizing your scatter plot: Refine
This article explains how you can customize a scatterplot 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, visit this article instead.
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 doing this step first, but you can change the size of your chart at any point.
Customizing the axes: Horizontal Axis & Vertical Axis
The Refine tab comes with six different sections. The first two let us customize your axes. Here you can decide which data your chart actually shows, and how:
Let's go through all the settings:
- Select column: This lets you select the column that you want to show on this axis. We choose the column "GDP per capita" for our horizontal axis and "Life expectancy" for our vertical axis.
- Custom range: Datawrapper sets the range automatically between your smallest and biggest value. But you might want to adjust that: Should our chart start at zero? Then you want to enter a "0" in the "min" field.
- Log: Right of the min/max text fields, you'll see the option to transform your data from a linear scale to a logarithmic scale. Log scales will be harder to understand by your readers, but make sense to show differences between clustered data points.
- Custom ticks: Datawrapper also sets nicely-spaced axis ticks automatically, but you can adjust them to your needs. For example, if we only type in a "50,100" in this field, our vertical axis will only display the ticks at the "50" and the "100" position.
- Format: We can now define how our values should be displayed, e.g. with how many decimal places. Our GDP numbers are really high, so we can shorten them: Let's choose the format "123k" to get an "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 horizontal axis and "left" for the vertical 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 opt for the default option, "on" again.
In this panel, we can choose the colors for our dots. You can either assign one color for all dots, or select customize columns to choose colors for a whole group of dots. When doing so, you can select any uploaded category column. In our case, that's the "continent" column. Depending on the continent a country is on, we can now give it different colors.
Select Show color key to display a color legend above the chart:
If you have many overlapping dots, consider changing the Symbol opacity or tick the checkbox Show outlines.
With the Size options, 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 can choose any column with numeric values. In our case, we choose the column "Population".
Once we choose a column, we can still adjust the size and define which size the biggest dot should have ( Maximum size):
Next, we can decide that our dots should not be dots at all – but triangles or crosses, for example. Once again we can make this decision for all dots ("fixed size") or make it dependent on a variable and select this column. Like with color, we can select any category 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 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 horizontal axis, we should choose a logarithmic trend line:
Here's what our chart now looks like with the trend line:
👉 To learn more about trend lines, what you can draw, and how to choose them, visit "How to choose a trend line"
That's it for the Refine tab. Let's move on to the Annotate tab. Here you'll find five more options to improve the outlook of your chart. We wrote an extra tutorial about these features: "Customizing your scatter plot: Annotate"