# Scatter Plot & Bubble Chart: Definition, Examples & 3D Charts

Descriptive Statistics > Scatter Plot / 3D Scatter Chart

Contents:

## What is a Scatter Plot?

Scatter plots (also called scatter graphs) are similar to line graphs. A line graph uses a line on an X-Y axis to plot a continuous function, while a scatter plot uses dots to represent individual pieces of data. In statistics, these plots are useful to see if two variables are related to each other. For example, a scatter chart can suggest a linear relationship (i.e. a straight line).

Scatter plot suggesting a linear relationship.

Scatter plots are also called scattergraphs, scatter charts, scatter diagrams and scattergrams.

## Correlation in Scatter Plots

The relationship between variables is called correlation. Correlation is just another word for “relationship.” For example, how much you weigh is related (correlated) to how much you eat. In statistics, there are two type of correlation: positive correlation and negative correlation. If data points make a line from the origin from low x and y values to high x and y values the data points are positively correlated, like in the above graph. If the graph starts off with high y-values and continues to low y-values then the graph is negatively correlated.

You can think of positive correlation as something that produces a positive result. For example, the more you exercise, the better your cardiovascular health. “Positive” doesn’t necessarily mean “good”! More smoking leads to more chance of cancer and the more you drive, the more likely you are to be in a car accident.

## Technology options

Simple scatter plots are fairly easy to draw by hand, especially if you have very few data points. However, in real life, you’re likely to have very large sets of data to work with. If you want to use technology to graph the plot you have several options:

## Scatter Plot in Excel: Overview

Creating scatter plots by hand can be cumbersome, especially if you have a large number of plot points. Microsoft Excel has a built in graphing utility that can instantly create a scatter plot from your data. This enables you to look at your data and perform further tests without having to re-enter your data. For example, if your scatter plot looks like it might be a linear relationship, you can perform linear regression in one or two clicks of your mouse.

## Scatter Plot in Excel: Steps

Example: Create a scatter plot in Microsoft Excel plotting the following data from a study investigating the relationship between height and weight of pre-diabetic patients:
Height (inches): 72, 71,70,67,65,64,64,63,62,60
Weight (lb): 180, 178,190,150,145,132,170,120,143,98

Step 1: Type your data into a spreadsheet. For the scatter plot to work correctly, your data must be entered into two columns. The example below shows data entered for height (column A) and weight (column B).

Step 2: Highlight your data. To highlight your data, left click at the top left of your data and then drag the mouse to the bottom right.

Step 3: Click the “Insert” button on the ribbon, then click “Scatter,” then click “Scatter with only markers.” Microsoft Excel will create a scatter plot from your data and display the graph next to your data in the spreadsheet.

Tip: If you want to change the data (and therefore your graph), there’s no need to redo the whole procedure. When you type new data into either column, Microsoft Excel will automatically calculate the change and instantly display the new graph.

## 3D Scatter Plot

A 3D scatter plot is a scatter plot with three axes. For example, the following 3D scatter plot shows student scores in three subjects: Reading (y-axis), Writing (x-axis) and Math (z-axis).

Student A scored 100 in Writing and Math and 90 in reading, and student B scored 50 in writing, 30 in reading and 15 in math. 3D plots are fairly easy to make for a few points, but once you start to get into larger sets of data, you’ll want to use technology. Unfortunately, Excel doesn’t have an option to create these chart. Statistical programs commonly available through colleges and universities (like SAS) can create them. There are quite a few free options available, but I recommend:

• Plotly is an easy way to create a 3D chart online.
• R: Also a download. Has a fairly steep learning curve, but handles most statistical computations. If you want a general stst package (As opposed to one that will just create charts), this is the best option.

What is a Bubble Chart?

## What is a Bubble Chart?

Bubble plot showing Medicare amounts per service/specialty. Image: CMS.gov.

A bubble chart is a way to show how variables relate to each other. It is similar to a scatter chart, only instead of dots there are different sized bubbles.

Bubble charts are a good choice if your data has 3 series/characteristics with an associated value; in other words, you need:

• a category with values for your x-axis,
• a category with values for your y-axis, and
• a category with values for sizing your bubbles.

They are often used for financial purposes and for use with quadrants.

## Types of Bubble Chart

In its most basic form, larger bubbles indicate larger values. The placement of the bubble on the x-axis and y-axis give you information about what the bubble represents. This chart shows length of investment (x-axis), price at time of purchase (y-axis) and the relative size of the investment today.

Color coded bubble plots use color to sort the bubbles into categories. For example, I might want to sort my investment chart into stocks, bonds, and mutual funds:

A cartogram is a bubble plot of a map, where the x-axis and y-axis are longitude and latitude. The size of the bubble could indicate population, number of oil rigs, natural weather events, or some other type of geographical data.

The charts are sometimes referred to by dimensions:

• Two-dimensional charts have x-values and y-values only. They are equivalent to a scatter plot.
• Three-dimensional charts have the x-y axes and bubble size.
• Four-dimensional charts have x-y axes, bubble size and color.

## MATLAB Instructions

Use the SCATTER(X,Y,S,C) command.

• Vectors X and Y must be the same size.
• S is the area of each bubble (in squared points). S can be a vector or a scalar. If scalar, all markers will be the same size.
• C is the maker color.

Check out our YouTube channel for more stats help and tips!

------------------------------------------------------------------------------

If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.