scatter plot

18
Scatter Plot Scatter plots provide an easy way to visualize relationships between numerical variables. In Tableau, you create a scatter plot by placing at least one measure on both the Columns and the Rows shelf. If these shelves contain both dimensions and measures, Tableau automatically places the measures as the innermost fields. A scatter plot can use several mark types. By default, Tableau uses the shape mark type. However, depending on your data, you might want to use another mark such as a circle or a square. Refer to Mark Types for more information. By default, measures are aggregated as a summation when placed on a shelf. Therefore, Tableau displays only one data point in each pane of a data table. You can view more data by disaggregating the measures or by placing one or more dimensions on another shelf such as Level of Detail, Shape, or Color. The following examples show you how to use scatter plots to explore your data: Scatter Plot–Basic Scatter Plot–Filter and Color Encode Scatter Plot–Filter and Level of Detail Scatter Plot–Filter, Level of Detail, and Color Encode Scatter Plot–Filter, Level of Detail, Color Encode, and Shape Encode

Upload: pavanreddyreddy

Post on 17-Jul-2016

4 views

Category:

Documents


1 download

DESCRIPTION

dd

TRANSCRIPT

Page 1: Scatter Plot

Scatter PlotScatter plots provide an easy way to visualize relationships between numerical variables. In Tableau, you create a scatter plot by placing at least one measure on both the Columns and the Rows shelf. If these shelves contain both dimensions and measures, Tableau automatically places the measures as the innermost fields.

A scatter plot can use several mark types. By default, Tableau uses the shape mark type. However, depending on your data, you might want to use another mark such as a circle or a square. Refer to Mark Types for more information.

By default, measures are aggregated as a summation when placed on a shelf. Therefore, Tableau displays only one data point in each pane of a data table. You can view more data by disaggregating the measures or by placing one or more dimensions on another shelf such as Level of Detail, Shape, or Color.

The following examples show you how to use scatter plots to explore your data:

Scatter Plot–Basic

Scatter Plot–Filter and Color Encode

Scatter Plot–Filter and Level of Detail

Scatter Plot–Filter, Level of Detail, and Color Encode

Scatter Plot–Filter, Level of Detail, Color Encode, and Shape Encode

 

Scatter Plot–BasicThis view displays the disaggregated profit and sales in a single pane as a scatter plot. You can create the view with the following procedure.

1. Place the Profit measure on the Columns shelf.

Page 2: Scatter Plot

The measure is automatically aggregated as a summation and an axis is created with a label given by the name of the field.

2. Place the Sales measure on the Rows shelf.

The measure is automatically aggregated as a summation and an axis is created with a label given by the name of the field.

3. Disaggregate the measures.

4. Select Aggregate Measures from the Analysis menu. This instructs Tableau to display all the data from your source as a scatter plot.

The view is shown below. Note that Tableau automatically selects the mark as Shape, the mark shape as an open circle, and the mark color as blue.

Page 3: Scatter Plot

 

Scatter Plot–Filter and Color EncodeThis view displays the disaggregated profit, sales, ship time, and discount as a scatter table. Additionally, brushing is used to visualize the relationships among the data. You can create the view with the following procedure.

1. Place the Profit and Time to Ship measures on the Columns shelf.

The Profit measure is automatically aggregated as a summation while Time to Ship is aggregated as a maximum.

2. Place the Sales and Discount measures on the Rows shelf.

The measures are automatically aggregated as a summation and axes are created with labels given by the field names.

3. Disaggregate the measures.

Select the Analysis > Aggregate Measures menu item. This instructs Tableau to display all the data from your source as a scatter plot.

4. Place the Product 1 - Category, Ship Mode, and Container dimensions on the Filters shelf.

o Filter Product 1 - Category to include only furniture.

o Filter Ship Mode to include delivery truck and regular air.

o Filter Container to include large box.

5. Place the Region dimension on the Color shelf.

Placing a dimension on the Color shelf separates the marks according to the members in the dimension, and assigns a unique color to each member. The color legend displays each member name and its associated color.

The view is shown below.

Page 4: Scatter Plot

You can easily highlight a specific set of data using color legend highlighting. Legend highlighting is a powerful analytical mode that allows you to focus on selected items in the color legend.

Turn on color legend highlighting by clicking the Highlight button in the title of the color legend.

Then select an item in the color legend. Marks that are associated with the selected member are colored while all other marks are gray.

Page 5: Scatter Plot

The view below highlights items that are out of stock. You can easily see that all of orders with long delivery times are for products that are out of stock.

 

Scatter Plot–Filter and Level of DetailThis view displays the aggregated profit and sales as a scatter plot using a circle as the mark type. The data are displayed with a level of detail given by the year, region, customer segment, and product category.

You can create the view with the following procedure.

1. Place the Profit measure on the Columns shelf.

Page 6: Scatter Plot

The measure is automatically aggregated as a summation and an axis is created with labels given by the field name.

2. Place the Sales measure on the Rows shelf.

The measure is automatically aggregated as a summation and an axis is created with labels given by the field name.

3. Place the Order Date dimension on the Filters shelf.

Filter Order Date to include only the year 2007. You open the Filter dialog box by selecting Filter from the field’s context menu.

4. Place the Region, Customer Segment, and Product 1 - Category dimensions on the Level of Detail shelf.

Placing a dimension on the Level of Detail shelf instructs Tableau to display the data according to the level of detail given by the dimension members. For example, the Region dimension separates the data points into four levels of detail: East, West, South and Central.

5. Select Circle from the Mark menu.

Using a circle as the mark type allows you to better distinguish between closely spaced data points.

The view is shown below.

Page 7: Scatter Plot

Note:

By default, mark borders are turned off. However, in this case it makes more sense to have them turned on to distinguish between closely spaced data points. You can turn on mark borders by selecting the Format > Show Mark Borders menu item.

 

Scatter Plot–Filter, Level of Detail, and Color Encode

Page 8: Scatter Plot

This view displays the aggregated profit and sales as a scatter plot using a circle as the mark type. The data are displayed with a level of detail given by the year, region, customer segment, and product category. Additionally, the data are color-encoded by product category.

You can create the view with the following procedure.

1. Place the Profit measure on the Columns shelf.

The measure is automatically aggregated as a summation and an axis is created with the label given by the field name.

2. Place the Sales measure on the Rows shelf.

The measure is automatically aggregated as a summation and an axis is created with the label given by the field name.

3. Place the Order Date dimension on the Filters shelf.

Filter Order Date to include only the year 2007. You open the Filter dialog box by selecting Filter from the field’s context menu.

4. Place the Region, Customer Segment, and Product 1 - Category dimensions on the Level of Detail shelf.

Placing a dimension on the Level of Detail shelf instructs Tableau to display the data according to the level of detail given by the dimension members. For example, the Region dimension separates the data points into three levels of detail: East, West, and Central.

5. Select Circle from the Mark menu.

Using a circle as the mark type allows you to better distinguish between closely spaced data points.

Page 9: Scatter Plot

6. Place the Product 1 - Category dimension on the Color shelf.

Placing a dimension on the Color shelf separates the marks according to the members in the dimension, and assigns a unique color to each member. The color legend displays each member name and its associated color.

The view is shown below.

As you can see, the data points are clustered according to product type. For example, the profit for technology (green) is consistently positive, has the largest values, and appears to have a strong linear relationship to the sales. Office supplies appear to have mostly positive profits, while furniture appears to have mostly negative profits.

To gain additional insight into the data, filter Product 1 - Category to include only furniture and office supplies. Open the Filter dialog box by selecting Filter from the field’s context menu.

Page 10: Scatter Plot

The view is shown below.

Now let’s look at an additional level of detail by placing the Ship Mode dimension on the Color shelf.

Page 11: Scatter Plot

Placing this dimension on the Color shelf separates the marks according to the members in the dimension, and assigns a unique color to each member. The color legend displays each member name and its associated color.

The view is shown below.

It appears that the items with large positive profits are all shipped by regular air, while the items with large negative profits are all shipped by delivery truck.

 

Scatter Plot–Filter, Level of Detail, Color Encode, and Shape Encode

Page 12: Scatter Plot

This view displays the aggregated profit and time to ship as a scatter plot using a shape as the mark type. The data are displayed with a level of detail given by the year, region, customer segment, and product category. Additionally, the data are color-encoded by ship mode.

You can create the view with the following procedure.

1. Place the Profit measure on the Columns shelf.

The measure is automatically aggregated as a summation and an axis is created with the label given by the field name.

2. Place the Time to Ship measure on the Rows shelf.

The measure is automatically aggregated as a maximum and an axis is created with the label given by the field name. Change the aggregation to an average by selecting Average from the field’s context menu.

3. Place the Order Date dimension on the Filters shelf.

Filter Order Date to include only the year 2007. Open the Filter dialog box by selecting Filter from the field’s context menu.

4. Place the Region, Customer Segment, and Product 1 - Category dimensions on the Level of Detail shelf.

Placing a dimension on the Level of Detail shelf instructs Tableau to display the data according to the level of detail given by the dimension members. For example, the Region dimension separates the data points into three levels of detail: East, West, and Central.

5. Filter Product Category 1.

You open the Filter dialog box by selecting Filter from the field’s context menu. Include only furniture and office supplies as shown below.

Page 13: Scatter Plot

6. Select Shape from the Mark menu.

7. Place the Ship Mode dimension on the Shape shelf.

The Shape shelf separates the marks according to the members in the dimension, and assigns a unique shape to each member. The shape legend displays each member name and its associated shape.

8. Place the Container dimension on the Color shelf.

Placing a dimension on the Color shelf separates the marks according to the members in the dimension, and assigns a unique color to each member. The color legend displays each member name and its associated color.

The view is shown below.

Page 14: Scatter Plot

Here are a few things you can learn from the data:

The large profit values are associated with items shipped in a small box and delivered via regular air. Additionally, these items have a consistent and relatively short average time to ship.

There are several outliers with very long average time to ship.

 

Page 15: Scatter Plot