Search code examples
scatter-plotcrosstabspotfire

creating scatter plot from cross table spotfire


Is there a way to do this in Spotfire? I want to be able to create a scatter plot from a cross table view of a data table. The way that I set up the cross table would result in 2 columns of data that I'd like to plot against each other. I have been looking for a while to no avail.

Example data would be like:

var1  var2  values
A1    B1    x
A1    B2    y
A2    B1    z
A2    B2    a

The cross table view is set up like this:

    B1  B2
A1  x   y
A2  z   a

I would like to now make a scatter plot of B1 vs B2. Somehow this is far more difficult in Spotfire than I thought it would be, as Spotfire does not treat the cross table as another data table but a view (if I understand this correctly).

Best,

Ken


Solution

  • you're correct that a cross table is a "virtual" view of an existing table, not an actual copy/new table.

    you can create a new table as a cross table by...

    1. File » Add Data Tables...
    2. click Add ▼ and choose the existing table (under the heading From Current Analysis)
    3. at the bottom of this dialog, click Show Transformations
    4. Add a new Pivot transformation
    5. configure the pivot as you like. in your case, I think the Row Identifier would be [var1], Column Titles [var2], and Values will be [values]. if you don't need any aggregation for [values], choose the First() aggregation method
    6. accept all changes and build the scatterplot using this new table