How to Use the Scatter Plot


To apply coloring:

  1. On the authoring bar, click to open the Data in analysis flyout.

  2. In the flyout, drag the column you want to color by to the center of the visualization.

    Response: Drop targets are shown in the middle of the visualization.

  3. Drop the column on the Color target.

    Response: The markers are colored with one color for each category in the selected column.

    Comment: To learn more about coloring in Spotfire, see Coloring Overview.

To shape markers by a column:

  1. On the authoring bar, click to open the Data in analysis flyout.

  2. In the flyout, drag the column that you want to shape by to the center of the visualization.

    Response: Drop targets are shown in the middle of the visualization.

  3. Drop the column on the Shape by target.

    Response: The markers are shaped with one shape for each category in the selected column.

    Comment: Shape is also available in the Properties dialog. There you can  change the fixed shape, or select pies as shape. To use pies, you must first aggregate the markers, as described below.

To aggregate markers:

  1. Right-click the scatter plot to display the pop-up menu.

  2. Select Properties.

    Comment: If the Legend is visible, the Marker by property may also be changed there.

  3. Click to display the Marker By page.

  4. Select a column to group the markers by under Show one marker for each. You can also select Remove to get the option (None) on the Marker By selector. If (None) is selected then the number of markers shown will depend on other properties only, such as which columns are selected on the axes or used to color by. None is often a good alternative if you intend to use pies as shape.

    Response: The markers are grouped so that a single marker is shown for each category in the selected column.

    Comment: Select (Row Number) to remove the aggregation and show one marker for each row.

To use multiple columns on one axis:

This is an example of how to use two columns on the Y-axis. Each column will be represented by a set of colored markers.

  1. Click the plus sign (Add one more column) next to the column selector on the axis of your choice.

  2. Select a new column from the menu.
    Comment: A column can also be dragged and dropped from the Data in analysis flyout.

  3. Select (Column Names) in the Color By drop down list.
    Response: The markers are colored with one color for each column.
    Comment: For more information on (Column Names), see the Non-Column Selections page.

To add more than one scale to the Y-axis:

When the measures on the Y-axis are of completely different magnitudes, you might benefit from using more than one scale on the axis.

  1. Right-click the Y-axis and select Dual scales or Multiple Scales from the pop-up menu.

    You can also go to the Y-axis page in the Visualization Properties dialog and click the Dual scales or Multiple scales radio button. This is also where you change the settings for the different scales and determine whether a certain scale should be located on the left or the right side.

  2. Comment: If you are using values from different columns on the various scales, you can drag columns from one side to another.

To adjust the drawing order of markers:

You can specify a column that defines in which order markers are drawn. This can be useful, when markers cover each other, partly or totally.

  1. Right-click the visualization to display the pop-up menu.

  2. Select Properties.

  3. Go to the Drawing Order page.

  4. In the Columns drop-down list, select the column to use for the drawing order.

    Response: The markers are drawn according to the column sort order.

    Tip: You can change the specified drawing order to the opposite. Select the Reverse drawing order of markers check box.

To add a reference line to the scatter plot:

  1. Right-click the visualization to display the pop-up menu.

  2. Select Properties.

  3. Go to the Lines & Curves page.

  4. Select the check box for any of the default lines or click on Add to define a new horizontal or vertical line.

    Comment: You can only add lines to the axes when they are in continuous mode. Right-click on the scale labels and select Continuous Scale from the pop-up menu.

To add a curve fit to the scatter plot:

  1. Right-click the visualization to display the pop-up menu.

  2. Select Properties.

  3. Go to the Lines & Curves page.

  4. Click Add and select a suitable curve fit from the drop-down menu.

    Comment: You can select from a number of predefined curve fits, or define your own curve using Curve Draw. See Curve Fit Models for more information about the different options.

  5. Once the curve has been created, you can change its settings on the Lines & Curves page. Some of the curve settings are also available from the pop-up menu in the visualization.

To add error bars to the scatter plot:

  1. Right-click the visualization to display the pop-up menu.

  2. Select Properties.

  3. Go to the Error Bars page.

  4. In the Visible error bars list, select the column or measure to use, and select the check box next to it.

    Response: The settings for the selected column or measure will be displayed in the lower part of the dialog.

    Comment: Only columns and measures with numerical values are listed.

  5. To define an upper error, choose a column or measure in the Upper error column selector. To define a lower error, choose a column or measure in the Lower error column selector.

    Response: The defined error bars are shown in the visualization.

    Comment: Error bars can only be used on numerical values.

To display images in labels:

This is an example of how you can use a binary column containing image information to label the markers in a scatter plot. You can of course use regular text labels or a number of other settings instead. See the Scatter Plot Properties - Labels page for more information about your available labeling options.

  1. Right-click the visualization to display the pop-up menu.

  2. Select Properties.

  3. Go to the Labels page.

  4. Select the column containing images under Label by.

    Comment: This example assumes that you have the images available as a binary column in your current data table. Your company might also have enabled a virtual column producer that lets you use other types of columns as images, for example, columns showing chemical structures. If you intend to retrieve such images via an information link you need to select an identifier column instead, and then use a different option under Get content from (e.g., Structure Column) to map the ID to the requested image.

  5. Determine whether to Show labels for All rows, Marked rows or None.

  6. If desired, modify the Max number of labels to limit the amount of shown labels further.

  7. (If required, select an option under Get content from to convert the selected column values to another form of output. See the comment on step 4.)

  8. Make sure that Show as is set to Image (or whatever the type of output is that you wish to display).
    Comment: In the example with structure columns mentioned under step 4, you would select a structure renderer here.

  9. If desired, change the Size of the labels by dragging the slider.

To display images in tooltips:

This is an example of how you can use a binary column containing image information in the tooltip shown when hovering with the mouse pointer over the markers in a scatter plot. You can of course use regular text tooltips instead. See the Scatter Plot Properties - Tooltip page for more information about your available tooltip options.

  1. Right-click the visualization to display the pop-up menu.

  2. Select Properties.

  3. Go to the Tooltip page.

  4. Click Add.

    Response: The Add Tooltip Value dialog is displayed.

  5. Select the Column containing images.

    Comment: This example assumes that you have the images available as a binary column in your current data table. Your company might also have enabled a virtual column producer that lets you use other types of columns as images, for example, columns showing chemical structures. If you intend to retrieve such images via an information link you need to select an identifier column instead, and then use a different option under Get content from (e.g., Structure Column) to map the ID to the requested image.

  6. If desired, change the display Name.

  7. (If required, select an option under Get content from to convert the selected column values to another form of output. See the comment on step 5.)

  8. Make sure that Show as is set to Image (or whatever the type of output is that you wish to display).
    Comment: In the example with structure columns mentioned under step 5, you would select a structure renderer here.

  9. If desired, change the Size of the labels by dragging the slider.

  10. Select whether or not to Include value name in tooltip.

  11. Click OK.

To create a new scatter plot:

  1. On the authoring bar, click to open the Visualization types flyout.

  2. Drag the Scatter plot visualization to the wanted position on the analysis page.

    Response: A first attempt to set up a suitable scatter plot is made.

  3. Adjust the scatter plot to display the measures of your choice.

    Comment: For more information about how to change what to show on the two axes, see Column Selectors.

To create a density plot:

For information about density plots, see What is a Scatter Plot?.

  1. In the scatter plot, select the numerical columns you want to display on the X-axis and the Y-axis.

  2. Use the binning tool to group the numerical data into intervals on these axes.

  3. Make sure Marker by is set to (None).

  4. Set Color by to (Row Count).

  5. Right-click the visualization to display the pop-up menu.

  6. Select Properties.

  7. Go to the Shape page.

  8. Select Tiled markers.

  9. Close Properties.

  10. Drag the sliders on the axes to adjust the number of bins.

See also:

What is a Scatter Plot?

Scatter Plot Properties