Spotfire® User Guide

Lines and curves

Some of the visualization types can include additional information in reference lines or several different types of curves. Lines and curves can be added in the visualization properties for each applicable visualization.

Note: Some of the functionality described here can only be authored or accessed using the installed Spotfire client.


For example, you might want to show how well your data points adapt to a certain polynomial curve fit or to a logistic regression curve fit.

Curve fit (regression analysis) allows you to summarize a collection of sample data points by fitting them to a model that can describe the data and show a curve or a straight line on top of a visualization. The curve is normally not a fixed curve, but rather a line that can be changed when changing the input data during filtering. However, you can always select to "freeze" the updating of a curve and only allow it to be updated manually.

Curve fitting can be used either to determine the parameter values of a known regression model or to find a model that fits the data better than other models. Spotfire also lets you define your own curves, either directly from an expression or from an expression which is linked to a data table containing curve parameters.

Note: Whenever there is a reference to X or Y in lines or curves for a bar chart, X always refers to the category axis while Y refers to the value axis.

See Adding a line or a curve to a visualization, Curve fit models and Curve fit theory for details about how to add lines and curves and how they work.

Transformations

The X- and Y-values used in the curve fitting are the plotted values and therefore, they are affected by scaling. This means that if you use log scale you might want to apply a different curve fitting model than you would otherwise. For example, if you want to do logistic regression and have either log10-values or log10-scaled values on the X-axis, you should apply the setting "Assume that X is log10-transformed" in the Edit Curve dialog to get the expected results.

Limitations on data

Not all types of input data can be used to calculate curves using all different types of models.

All models require:
  • more than one data point to use in the calculation
  • that not all data points have the same X- and Y-values (lie on top of each other)
  • that not all data points have the same X-value

In addition, the logarithmic model, the power model and the logistic regression model require that all data points have positive X-values. The power model and the exponential model also require that all Y-values have the same sign (positive or negative).

The logistic regression requires that not all data points have the same Y-value. If any of the above limitations occur, no curve will be drawn and a notification will be shown on the title bar of the visualization.

If you choose to export your calculation, any error message shown in this tooltip will also be included in the column "Notes" of the resulting export file. Note that this column always exists in the export file. If there are no errors, it will be empty.