Tableau 简明教程

Tableau - Scatter Plot

顾名思义,散点图显示了许多散布在笛卡尔平面上​​的点。它通过将数值变量的值绘制为笛卡尔平面中的 X 和 Y 坐标来创建。Tableau 至少需要一行架中的一个度量和一列架中的一个度量来创建散点图。但是,我们可以向散点图中添加维度字段,这些字段会在散点图中已存在的点上标记不同的颜色。

As the name suggests, a scatter plot shows many points scattered in the Cartesian plane. It is created by plotting values of numerical variables as X and Y coordinates in the Cartesian plane. Tableau takes at least one measure in the Rows shelf and one measure in the Columns shelf to create a scatter plot. However, we can add dimension fields to the scatter plot which play a role in marking different colors for the already existing points in the scatter graph.

Simple Scatter Plot

使用示例超级商店,让我们找出散布在笛卡尔平面上​​的销售额和利润数字的变化,并根据它们的产品子类别进行分布。要实现此目标,请执行以下步骤。

Using the Sample-superstore, let’s aim to find the variation of sales and profit figures as the two axes of the Cartesian plane is distributed according to their Sub-Category. To achieve this objective, following are the steps.

Step 1 - 将度量销售拖放到列架。

Step 1 − Drag and drop the measure Sales to the Columns shelf.

Step 2 - 将度量利润拖放到行架。

Step 2 − Drag and drop the measure Profit to the Rows shelf.

Step 3 - 将维度子类别拉到“标记”下的标签架。

Step 3 − Pull the dimension Sub-Category to the labels Shelf under Marks.

将显示以下图表,其中显示了利润和销售额如何分布在产品子类别中。

The following chart appears which shows how profit and sales is distributed across the Sub-Category of products.

sactter 1

Scatter Plot - Color Encoded

您可以通过将维度子类别拖动到标记卡下面的颜色区中来获取颜色编码的值。此图表显示了不同颜色散点图的散点。

You can get the values color encoded by dragging the dimension Sub-Category to the color Shelf under the Marks card. This chart shows the scatter points with different color for each point.

sactter 2

Drill-Down Scatter Plot

当您选择具有层次结构的维度时,相同的散点图可以显示不同的值。在下面的示例中,我们展开子类别字段以显示制造商的散点图值。

The same scatter plot can show different values when you choose a dimension with hierarchy. In the following example, we expand the Sub-Category field to show the scatter plot values for the Manufacturers.

sactter 3