Tip:
Highlight text to annotate it
X
When you want to represent your data in a chart, you have to carefully consider what type of chart you are going to need,
what are you trying to say with this chart,
and what is the actual data that you are plotting in this chart.
In this example here, we have temperature recorded at different days,
so we want to display the temperature change throughout those days.
The two possibilities we have is to use either a line chart or an XY scatter plot.
But when we think about the line chart itself, it will show a trend of change, however, the different elements
that are plotted on the line chart will be assumed to be at regular intervals. And if we look carefully at the days that we have collected
our samples we can see they are not at regular intervals. So I want to show you the difference in how one type of data
will represent the information and how the other one will do that.
So we will start first of all with a line chart. Let's select the data than we want to display in the line chart
Simply select the data, go to the Insert tab and choose a line chart. I will use the one that also shows the markers
where the actual measurements are. When you plot a Line chart it will automatically try to plot every number as a separate series of data.
So you can see that because our days are in numbers
it actually plotted both sets of data as two series of data.
You can see one chart representing the days and the other one the temperature
Obviously that is not what we want, because we want simply the temperature and the days to be used as labels along the x axis.
So we'll have to delete that chart and select simply just the temparature to be displayed as a line chart.
And there it is. However because it will automatically assume that there are regular intervals, it will just number them consecutively
but this is not what we need. We want to use our own labels to show at which days this measurements is actually taken
So we will need to change the axis labels along the x axis. To do that simply right click on the chart, go to Select Data
and there you have access now to changes in the axis labels. So we want to edit this and select our own labels from our data
Click OK and OK, and now we can see the data that we have, represented in labels along the X axis
But as I mentioned earlier, the line chart assumes that the measurements are taken at regular intervals
and the information that is plotted along the x axis is going to be used simply as labels, as categories.
Any numerical value will be completely disregarded, although we see number, for the computer, this are not numbers this a just labels.
So we can see our point 1, for example, we have a label for it, number 1, and this means our day 1.
The next point is number 2, which is taken at day 5.
The next points here has been taken at day 7, exactly as our data shows here, and the next one is taken at day 15,
exactly as our data shows. However, if you look at the intervals between day 5 and day 7, we have 2 days.
Between day 7 and day 15 we have 8 days.
But on our chart the distance is exactly the same.
So, a line chart in this case will not be a truthful representation of the data we have,
simply because the intervals here, along the x axis are not the same and by using a line chart, we are ignoring that.
So I will just move this chart to the side and will create a new chart. This time we are going to use an XY scatter plot.
The XY scatter plot is taking into account the numerical values of both the x and the y component of our data,
so every point on the chart will be represented by its X and Y component.
So we're looking more for a relationship between those two values.
And if we insert now the XY scatter plot (I will choose similar type, so you can see easier the difference),
and this now the data we have.
And as you can see, the distance between the intervals is now not the same.
We are still representing the temperature here, but our point 1 is 12 degrees exactly as it is represented here.
At day 5 the measurement is taken and is plotted correctly.
Day 7, the distance between day 5 and day 7 is a lot more realistic here.
And the data has been plotted correctly.
And the next point is day 15, so you can see now the distance between those two is a lot more realistic than on the line chart.
So if we compare them side to side, you can see immediately the difference between those.
So with line charts and XY scatter plot,
it is important to consider what is the value in the x axis.
is it simply a category, name, something that can be a string
is it simply a category, name, something that can be a string
or it is numeric value that needs to be taken into account and is definitely not at equal intervals
and then we can choose which one of those two types will represent best our data.
and then we can choose which one of those two types will represent best our data.