Customization Menu

Scatter Charts in Google Sheets – Step-by-step with examples

What is a scatter chart?

A scatter chart (AKA scatter plot or XY graph) uses points along a two dimensional graph to show the relationship between two sets of data. Its simplicity can make it quite effective at cutting through the noise of large amounts of data in a Google spreadsheet. Once you can see the relationship, it can be used to predict future outcomes within certain confidence levels.

When to use a scatter chart

Before you jump into using a scatter chart, be sure that it is the right type of chart for you. This chart type decision tool can help you decide.

As an example, if you want to see if more people will use the water park as it gets warmer, a scatter chart could be a good tool. If you use any more than two variables, the chart can start to appear confusing and thus reduce its usefulness.  

These charts can be customized in many ways. The first example below has had its points reduced to 2 px, a linear trendline added, and the correlation shown in the upper right hand corner of the chart. These options can be found on the customize menu when inserting a chart.

Customization Menu
Customization menu
Example scatter chart
Example scatter chart

Video Explanation

Correlation

Mathematically speaking, creating a scatter chart lets you visualize the correlation between data points, if there is any. In the example above, the correlation is .928, with the highest value of any correlation being 1. The chart was created in Google Sheets using random values for the Y axis and (Y + random values) for the X axis.  The random value range was kept small so that it would create a tight correlation. Most users for which a spreadsheet chart is made will probably not remember what a correlation value means. A trendline is the layman’s tool for seeing the correlation.

Trendline

You can draw a line through the data along the path which is the best fit based on the points already on the chart. You can see how close the correlation is to 1 or negative 1 by simply looking at the distance that the dots are away from the line.  This line can be used to extrapolate correlations outside of the current data. If you are trying to find data points inside the current set, it is called interpolation. This line can be straight (linear), or it can be a curve (exponential or polynomial).

Choices of trendlines
You can choose from several types of trendlines

Choices of trendlines
You can choose from several types of trendlines

Linear

Below is a simple scatter chart with a correlation value of 1. This means that each of the two variables move in lock step with eachother in the same direction. If the left shoes size increases by one, so does the right. The line of best fit with a perfect correlation is linear and extends 45 degrees from left to right. Note that it will only be 45 degrees on the chart if the scale of the x and y axis are the same scale.

Scatter chart with correlation of 1
Scatter chart with correlation value of 1

Some types of data could have a negative correlation. For example, the relationship between BTU’s needed to heat a room and the outside temperature would create a graph that slants down as it moves along the x axis.

Scatter chart with correlation of -1
Scatter chart with correlation value of -1

Of course, not all data are so highly correlated. If it were, there would be no “scatter” in a scatter chart. This chart shows data with a correlation between -1 and 1. Note that the slope calculation and correlation value were included in the chart by choosing “Use Equation” as the label and placing a checkmark next to R2 to the correlation in the customization are of the chart menu.

Trendline Labels
Setting labels for trendlines

Scatter chart with some correlation
Scatter chart with correlation value shown on chart

Exponential

Exponential trendlines are a good fit for data that increase or decreases at a constantly increasingn rate.

Scatter chart with an exponential trendline
Scatter chart with an exponential trendline

Polynomial

A polynomal trendline should be used when data flucuates between values. Note that the polynomial trenline is more tightly correlated with this data. The data is the same as the data used for the exponential trendline.

Scatter chart with a polynomial trendline
Scatter chart with a polynomial trendline

Error Bars

To illstrate that your data in not precise and may be within a certain range, error bars can be used. These bars are found in the customization menu and be set for different ranges in percentage or absolute terms. The chart below shows error bars added to a simple scatter chart to show uncertainty in the data. They were created by using a constant value of 2.25. These can be used with our without a trendline depending on the point that you are trying to make to the viewer of your chart.

Scatter chart with error bars
Scatter chart with error bars

What is a scatter chart?

A scatter chart (AKA scatter plot or XY graph) uses points along a two dimensional graph to show the relationship between two sets of data. Its simplicity can make it quite effective at cutting through the noise of large amounts of data in a Google spreadsheet. Once you can see the relationship, it can be used to predict future outcomes within certain confidence levels.

When to use a scatter chart

Before you jump into using a scatter chart, be sure that it is the right type of chart for you. This chart type decision tool can help you decide.

As an example, if you want to see if more people will use the water park as it gets warmer, a scatter chart could be a good tool. If you use any more than two variables, the chart can start to appear confusing and thus reduce its usefulness.  

These charts can be customized in many ways. The first example below has had its points reduced to 2 px, a linear trendline added, and the correlation shown in the upper right hand corner of the chart. These options can be found on the customize menu when inserting a chart.

Customization Menu
Customization menu
Example scatter chart
Example scatter chart

Video Explanation

Correlation

Mathematically speaking, creating a scatter chart lets you visualize the correlation between data points, if there is any. In the example above, the correlation is .928, with the highest value of any correlation being 1. The chart was created in Google Sheets using random values for the Y axis and (Y + random values) for the X axis.  The random value range was kept small so that it would create a tight correlation. Most users for which a spreadsheet chart is made will probably not remember what a correlation value means. A trendline is the layman’s tool for seeing the correlation.

Trendline

You can draw a line through the data along the path which is the best fit based on the points already on the chart. You can see how close the correlation is to 1 or negative 1 by simply looking at the distance that the dots are away from the line.  This line can be used to extrapolate correlations outside of the current data. If you are trying to find data points inside the current set, it is called interpolation. This line can be straight (linear), or it can be a curve (exponential or polynomial).

Choices of trendlines
You can choose from several types of trendlines

Choices of trendlines
You can choose from several types of trendlines

Linear

Below is a simple scatter chart with a correlation value of 1. This means that each of the two variables move in lock step with eachother in the same direction. If the left shoes size increases by one, so does the right. The line of best fit with a perfect correlation is linear and extends 45 degrees from left to right. Note that it will only be 45 degrees on the chart if the scale of the x and y axis are the same scale.

Scatter chart with correlation of 1
Scatter chart with correlation value of 1

Some types of data could have a negative correlation. For example, the relationship between BTU’s needed to heat a room and the outside temperature would create a graph that slants down as it moves along the x axis.

Scatter chart with correlation of -1
Scatter chart with correlation value of -1

Of course, not all data are so highly correlated. If it were, there would be no “scatter” in a scatter chart. This chart shows data with a correlation between -1 and 1. Note that the slope calculation and correlation value were included in the chart by choosing “Use Equation” as the label and placing a checkmark next to R2 to the correlation in the customization are of the chart menu.

Trendline Labels
Setting labels for trendlines

Scatter chart with some correlation
Scatter chart with correlation value shown on chart

Exponential

Exponential trendlines are a good fit for data that increase or decreases at a constantly increasingn rate.

Scatter chart with an exponential trendline
Scatter chart with an exponential trendline

Polynomial

A polynomal trendline should be used when data flucuates between values. Note that the polynomial trenline is more tightly correlated with this data. The data is the same as the data used for the exponential trendline.

Scatter chart with a polynomial trendline
Scatter chart with a polynomial trendline

Error Bars

To illstrate that your data in not precise and may be within a certain range, error bars can be used. These bars are found in the customization menu and be set for different ranges in percentage or absolute terms. The chart below shows error bars added to a simple scatter chart to show uncertainty in the data. They were created by using a constant value of 2.25. These can be used with our without a trendline depending on the point that you are trying to make to the viewer of your chart.

Scatter chart with error bars
Scatter chart with error bars
chrome new tab

Google Sheets – Split view and new window

If you are working on a large table of data in Google Sheets, often it is helpful to be able to see and edit more than one area of the spreadsheet at a time. This is not available from the menus in Sheets and is one of the few ways in which Excel is superior to Sheets. There is the option to Freeze rows or columns, but the frozen section of the spreadsheet will not independently move and therefore the Freeze option is limited to applications such as freezing headers at the top or side of a spreadsheet. Further, if you headers are half way down the spreadsheet, the Freeze option will not do you any good.

The solution

If you are working on a mobile device you may be out of luck, but if you are accessing Sheets through a browser, there is a great work around that will allow you to see the same spreadsheet in two or more different windows. You can even spread these views over multiple monitors which you cannot do in Excel without some pretty nasty workarounds.

Watch the video

This site has a companion YouTube channel that has pretty much, well almost exactly, the same content. If you like this, you'll like that.

If you are using the Chrome browser, do the following:

First, be sure to have your spreadsheet open in your browser. Then, open a new browser tab by pressing “t” while holding down the control button (ctl+t) or clicking the shape to the right of your open tab.

chrome new tab

Once you have a new tab open, the first thing you do is open the same spreadsheet again in this new window. Now, you have the spreadsheet open in two places. You can edit it in either window. Click and hold your left mouse button on the middle of the new tab, where the title of the page is, and pull the tab away from the browse. In browsers other than chrome, you may have have to open another browser window. This creates a new window with a separate instance of Chrome (or other browser) but keeps the spreadsheet inside of it.

If you want more windows, just repeat the same process. To rearrange the windows, you can use the Windows key. Hold the Windows key down and press the left arrow to have the window fill up the left half of the screen and the right arrow for the right half. You also can resize the windows the more traditional way with your mouse. If you have multiple monitors, you can spread these windows across them.

Using multiple tabs in other browsers

 ff new tab

ie new tab

Update: Thanks to ADTC in the comments below for this tip. If you’re using Chrome, you can just right-click on the tab that you’re using and choose duplicate.
insert drawing

How to draw a straight line in Google Sheets

If you are using Google Sheets, you may be having some trouble finding how to insert a line. Once you have figured out how to insert it, getting it to be straight can be frustrating. Follow these easy steps to get it done.

Go to Insert, then Drawing.

insert drawing

From here, choose Line.

line

Now, here’s where the real trick comes in.  If you want to draw a line, go ahead.  But, if you want to draw a straight line, hold down the shift key while you draw!  There it is, a straight line.

straight line

Watch the video

This site has a companion YouTube channel that has pretty much, well almost exactly, the same content. If you like this, you'll like that.

line

How to draw a straight line in Google Slides

If you are using Google Slides, you may be having some trouble finding how to insert a line. Once you have figured out how to insert it, getting it to be also straight can be frustrating. Follow these easy steps to get it done.

Go to menu bar and select line.

line
Line option on the main menu
Watch the video

This site has a companion YouTube channel that has pretty much, well almost exactly, the same content. If you like this, you'll like that.

Now, here’s where the real trick comes in. If you want to draw a line, go ahead. But, if you want to draw a straight line, hold down the shift key while you draw! There it is, a straight line.

line
A very straight line!

text box row label

Google Sheets – Rotate text in cell

5 Ways to alter the orientation of the text in a cell


Spoiler altert – all of them are workarounds!

As of late February, 2017, the ability to rotate text is native to Google Sheets. The option is the slanted A on the main menu to the right of text wrapping.

Use a text box then rotate it

text box row label

Text boxes are inserted using the drawing menu with Insert-> Drawing -> Text Box.  As can be seen in the picture, they do not reside in a cell, but rather they sit on top of them.  This is why the text box will not affect your row height.  Once the text box is created, it can be rotated as much as you would like.  After rotating it, you can then move the text box to wherever you would like it.

Video explanation

Skinny column with wrapped text

skinny column

You can also achieve vertical text by typing the text in the cell normally.  Then, you shrink the width of the column to a little more than one character wide.  Next, you apply word wrap by selection Text Wrapping (on the menu bar) then Wrap.  One disadvantage of this method (and all of the remaining methods) is that it alters the height of the row in which it is placed.  Also, the technique requires that the column is skinny and therefore it will limit the way in which other content can be viewed if it is in the same column.  Depending on how you are using the vertical text, this may or may not be a problem.

 Array formula

Just put the text that you want into this crazy formula.  Remember to type it in both places.

=ARRAYFORMULA(CONCATENATE((MID( "Text to become vertical"; ROW(INDIRECT("YY1:YY"&LEN( "Text to become vertical" ))); 1)&CHAR(10))))

How does it work?  Who cares!  Just use this method if you find it easier.

Regular Expression

 Similar to the array formula, just a crazy formula into which you can insert your text.

=REGEXREPLACE( "Text", "(.)", "$1"&CHAR(10) )

I would say that you should use this formula as opposed to the Array formula simply because it is shorter and you only need to type the text once.

Control Enter

control enter

If you hold down the control key then press enter after a character, you will get a new line within that cell.  Therefore, to enter vertical text, just type control enter after every letter.  In my humble opinion, this is probably the cleanest solution until there is a true option is Sheets to rotate text in a cell.  It does not require the column to be a certain width nor do you need a long formula.

Follow image below for the live Google doc with this data

docs share icon