散点图(也称为散点图)是数据分析师的有用工具,有助于直观地探索和分析两个不同的数据集。例如,如果您要比较不同销售团队的销售结果,散点图可以让您看到谁的表现最好(或最差),就像折线图一样。
虽然您可以使用Excel 制作散点图(Excel to make a scatter plot),但另一种方法是使用免费提供的Google 表格(Google Sheets)来制作散点图。在本文中,我们将解释如何在Google 表格(Google Sheets)中制作散点图,包括如何在创建后对其进行自定义。
如何在Google表格中制作散点图(Scatter Plot)
顾名思义,散点图使用图表上的散点来可视化两种或多种类型的链接数据。例如,如果您想比较销售团队的销售额和利润,散点图(显示利润与销售收入)将是完美的,显示每个销售人员的利润和收入。
只要您有两个可比较的数据集,就可以创建散点图,而Google 表格(Google Sheets)通过其图表创建工具使这变得容易。
- 要在Google 表格(Google Sheets)中创建散点图,请打开电子表格(open a spreadsheet)并选择包含数据的单元格。选择数据后,从菜单中选择Insert > Chart
- 这将在右侧面板中打开图表编辑器工具。(Chart editor )Google 表格(Google Sheets)将自动尝试确定应与所选数据一起使用的图表类型。如果Google 表格(Google Sheets)未自动选择散点图,请从“设置”选项卡下列出的“(Setup)图表类型(Chart type)”下拉菜单中选择它。如果您不确定每个图表是什么,请将鼠标悬停在其上以列出名称。
- 图表编辑器将使用选定的单元格来形成绘图图表的数据范围。如果要更改此设置,请按选择数据范围按钮(在(Select data range )数据范围(Data range)框旁边)。或者,手动在数据范围(Data range)框中键入单元格范围。
- 插入的图表将立即更新为新的图表类型。默认情况下,散点图将包含将两种形式的数据联系在一起的X 轴数据(X-axis data)(例如,销售团队的名称)。该系列(series )将显示您要比较的两种(或更多)形式的数据(例如利润和收入)。要添加其他系列,请选择添加系列(Add Series)框并选择其他数据集之一。
- 如果您需要删除其中一个系列,请选择汉堡菜单图标(hamburger menu icon),然后选择删除(Remove )选项。
- 如果您希望Google 表格(Google Sheets)使用第一行来创建标题标题,请选中将第 1 行用作标题(Use row 1 as headers)复选框。要将第一列用作标签(显示在X 轴(X-axis)旁边),请选中将A 列用作标签(Use column A as labels)复选框。您还可以通过选择Switch rows/columns复选框来切换行和列。
自定义散点图
与Google 表格(Google Sheets)中的所有图表和图形一样,图表编辑器提供了许多额外的自定义选项。这允许您更改标签、轴标题、颜色、字体等。
- 要自定义散点图,请确保右侧的图表编辑器面板可见。(chart editor)如果不是,请选择图表,然后选择右上角的汉堡菜单图标。(hamburger menu icon)从菜单中,选择编辑图表(Edit the chart)选项。
- 在图表编辑器菜单的(Chart editor)自定义(Customize)选项卡中,您可以开始对图表进行更改。要更改图表颜色和字体,请选择图表样式(Chart style)类别并选择选项之一(例如背景颜色(background colour))进行更改。您所做的任何更改都会自动显示。
- 在图表和轴标题(Chart and axis titles)下,您可以更改图表和图表轴的显示标题。从图表标题(Chart title)下拉菜单中选择一个标题选项,然后在标题文本(Title text)框中插入您希望使用的文本。然后,您可以在框下方的选项中设置文本格式(包括字体、格式和颜色)。
- 默认情况下,Google 表格(Google Sheets)散点图上的数据点显示为圆形(circles)。要使用不同的形状(例如,三角形或 X 标记),请选择系列(Series)类别,然后从点形状(Point shape)下拉菜单中选择一个新形状。您还可以从磅(Point size)值下拉菜单中选择新的磅值。
- 图例允许您识别散点图上的点属于哪些数据集。要更改图例的字体、格式、颜色和位置,请选择图例(Legend)类别并使用提供的选项进行更改。
- 在水平轴(Horizontal axis )和垂直轴(Vertical axis)类别中,您可以更改不同轴标签的格式。选择(Select)任一类别,然后从提供的选项中更改字体、字体大小、格式和颜色。如果要反转轴顺序(从左到右或从右到左),请选中反转轴顺序(Reverse axis order)复选框。
- 为了帮助您的散点图更加明显,您可以添加网格线和刻度线。为此,请选择网格线和刻度(Gridlines and ticks )类别,然后从下拉菜单中选择水平轴(Horizontal axis )或垂直轴。(Vertical axis )选中水平轴(Horizontal axis )选项后,选择主要刻度(Major ticks)复选框以启用水平轴上的刻度,然后对其下方的设置(包括位置、长度、颜色和粗细)进行进一步更改。
- 在网格线和刻度菜单中选择(Gridlines and ticks)垂直轴(Vertical axis)选项后,您可以为垂直轴启用网格线(主要和次要)和刻度。选择主要网格线、次要网格线、(Major gridlines, Minor gridlines,)主要刻度(Major ticks)或次要刻度(Minor ticks )复选框以启用这些选项,然后更改其下方的设置(包括颜色、位置、长度、粗细和颜色)。
创建可视化电子表格
现在您知道如何在Google 表格(Google Sheets)中制作散点图了,您还可以尝试创建其他Google 表格(Google Sheets)图形和图表以进行数据分析,从折线图(line chart)到条形图(bar graph)。如果您遇到困难,可以使用Google 表格模板(Google Sheets templates)开始使用,准备好填写数据并围绕它创建自己的图表。
有经验的 Excel 用户也可以轻松地将电子表格转换为 Google 表格(convert spreadsheets to Google Sheets),但不支持某些功能(如Excel 宏)。(Excel macros)您可以更进一步,使用Google 表格脚本(Google Sheets scripts)来扩展功能并将电子表格与其他Google和第三方服务集成。
How to Make a Scatter Plot in Google Sheets
Α scatter plot (also known as a scatter plot graph) is a useful tool for data analysts, helрing to visually explore and analyze two different data sets. For instance, if you’re comparing the sales results аcross different sales teams, a scatter plot would allow you to see who wаs the best (or worst) performing, much like a line chart would.
While you could use Excel to make a scatter plot, another way you can do it is to use the freely-available Google Sheets to make a scatter plot instead. In this article, we’ll explain how to make a scatter plot in Google Sheets, including how to customize it once it’s created.
How to Make a Scatter Plot in Google Sheets
A scatter plot, as the name suggests, uses scattered dots across a chart to visualize two or more types of linked data. For instance, if you wanted to compare the sales and profits of a sales team, a scatter graph (showing the profit vs the sales revenue) would be perfect, showing the profit and revenue for each salesperson.
As long as you have two comparable data sets, it’s possible to create a scatter plot, and Google Sheets makes this easy with its chart creation tool.
- To create a scatter plot in Google Sheets, open a spreadsheet and select the cells containing your data. With the data selected, select Insert > Chart from the menu.
- This will open the Chart editor tool in the right-hand panel. Google Sheets will automatically attempt to determine what type of chart or graph it should use with the selected data. If Google Sheets hasn’t selected a scatter plot automatically, select it from the Chart type drop-down menu, listed under the Setup tab. If you’re unsure what each chart is, hover over it to list the name.
- The chart editor will use the selected cells to form the data range for the plot chart. If you want to change this, press the Select data range button (next to the Data range box). Alternatively, type the cell range into the Data range box manually.
- The inserted chart will immediately update to the new chart type. By default, a scatter plot will have X-axis data that ties the two forms of data together (eg. the names of a sales team). The series will show the two (or more) forms of data that you want to compare (eg. profit and revenue). To add additional series, select the Add Series box and choose one of the additional data sets.
- If you need to remove one of the series, select the hamburger menu icon, then select the Remove option.
- If you want Google Sheets to use the top row to create header titles, select the Use row 1 as headers checkbox. To use the first column as labels (shown alongside the X-axis), select the Use column A as labels checkbox. You can also switch rows and columns by selecting the Switch rows/columns checkbox.
Customizing a Scatter Plot
Like all charts and graphs in Google Sheets, the chart editor offers a number of additional customization options. This allows you to change labels, axis titles, colors, fonts, and more.
- To customize a scatter plot, make sure that the chart editor panel on the right-hand side is visible. If it isn’t, select the chart, then select the hamburger menu icon in the top-right. From the menu, select the Edit the chart option.
- In the Customize tab of the Chart editor menu, you can begin to make changes to your chart. To change the chart colors and fonts, select the Chart style category and select one of the options (eg. background colour) to make changes. Any changes you make will appear automatically.
- Under Chart and axis titles, you can change the displayed titles for the chart and chart axes. Select a title option from the Chart title drop-down menu, then insert the text you wish to use in the Title text box. You can then format the text (including font, formatting, and color) in the options below the box.
- By default, data points on a Google Sheets scatter plot are displayed as circles. To use a different shape (for instance, triangles or X marks), select the Series category, then choose a new shape from the Point shape drop-down menu. You can also select a new point size from the Point size drop-down menu.
- The legend allows you to identify what data sets the points on a scatter plot belong to. To change the font, formatting, color, and position of the legend, select the Legend category and make changes using the options provided.
- In the Horizontal axis and Vertical axis categories, you can change how the different axis labels are formatted. Select either category, then make changes to the font, font size, formatting, and color from the options provided. If you want to reverse the axis order (from left to right or right to left), select the Reverse axis order checkbox.
- To help make your scatter plot more visible, you can add gridlines and ticks. To do this, select the Gridlines and ticks category, then select either Horizontal axis or Vertical axis from the drop-down menu. With the Horizontal axis option selected, select the Major ticks checkbox to enable ticks on the horizontal axis, then make further changes to the settings (including position, length, color, and thickness) below it.
- With the Vertical axis option selected in the Gridlines and ticks menu, you can enable gridlines (both major and minor) and ticks for the vertical axis. Select the Major gridlines, Minor gridlines, Major ticks or Minor ticks checkboxes to enable these options, then make changes to the settings (including color, position, length, thickness, and color) below it.
Create Visual Spreadsheets
Now you know how to make a scatter plot in Google Sheets, you can also experiment with creating other Google Sheets graphs and charts for data analysis, from a line chart to a bar graph. If you’re struggling, there are Google Sheets templates you can use to get started, ready for you to fill with data and create your own charts around it.
Experienced Excel users can also convert spreadsheets to Google Sheets with ease, although some features (like Excel macros) won’t be supported. You can take things even further, using Google Sheets scripts to expand functionality and integrate spreadsheets with other Google and third-party services.