Business Intelligence Tools

Spotfire Functions – Lines & Curves – Curve Draw

  • Would you like to know more about how to use the curve draw function?
  • Would you like to create your own decline curve in Spotfire?

As promised, this week’s post will discuss Curve Draw, one of the four Lines & Curves features showcased last week, but only at a high level.  This week, I’ll go a bit deeper into Curve Draw starting with an example to show how it works, and then I’ll move on to a more functional example.

To recap from last week, curve draw will plot a line based on an equation specified by the user where y is a function of x.  In the example below, I am plotting a line that is 2 * x.

Things to know about curve draw

  • Users may employ functions and properties in the expression.  This is slightly counter intuitive because the dialog provides a list of functions but not a list of properties.  The user must know the syntax and property control name.  Just make sure the Status: line says OK as shown here. screenshot2screenshot1
  • Users cannot employ columns of data from the data table.  screenshot6
  • The user must enter all operators.  Expressions such as 2x are not valid. screenshot3
  • Curve Draw is plotting based on an expression.  If x is utilized, then filtering is taken into consideration because there won’t be any values on the x axis that have been filtered out.

Here is an example of the Curve Draw being used with the simple expression y = 2*x.  Y is very clearly a function of x.


Here is an example of the log function being used to draw lines.   The expression is provided as a label in the visualization.


Now that I’ve explained what Curve Draw does, let’s look at another example.

In the screen shot below, I have created three input property controls named Qi, Di and bfactor that will be the inputs into a hyperbolic decline curve.  I used the Curve Draw function with the expression shown below to calculate the decline.  The expression is referencing the property controls using the syntax ${PropertyName}.  Note that the expression uses the x axis value, which is time in number of months.  Also notice that there are two parts to the expression, which I have indicated with different colors.  The only difference between them is that the first part is looking at x and the second part is looking at x-1, so the calculation is subtracting the result of month 2 from the result of month 1 and so on.

${Qi}/((1-${bfactor})*${Di})*(1-((1+${bfactor}*${Di}*x)^(1-1/${bfactor}))) – ${Qi}/((1-${bfactor})*${Di})*(1-((1+${bfactor}*${Di}*(x-1))^(1-1/${bfactor})))



Next week I will discuss Curve from Data Table.

9 thoughts on “Spotfire Functions – Lines & Curves – Curve Draw

  1. Pingback: Spotfire Functions – Lines & Curves – Curve from Data Table |

  2. Pattranun Reply

    Is there any way to reset the position of label for draw line and curve label?

  3. Pingback: Missing Options in Lines & Curves • The Analytics Corner

  4. Chad Holland Reply

    Is there are way to terminate the line at a 0,0 origin position? For instance, creating a custom axis?

    • Julie Sebby Post authorReply

      There is a way to do that. Someone asked me that in one of the first weeks I ever worked support. I will have to dig to find that answer though.

      • Julie Sebby Post authorReply

        Do you want to terminate a curve draw line specifically?

  5. Naresh Reply

    Can we color lines and curves labels with different colors?For instance I have 3 horizontal lines with different colors, I need to color these horizontal line’s labels with three different colors.

    Thanks in advance!

    • Julie A Sebby Reply

      Unfotunately the application does not allow that with out of the box functionality. You might be able to do label coloring with CSS, but I know you won’t be able to make the labels different colors because the labels will all be the same object that is formatted.

Leave a Reply

Your email address will not be published. Required fields are marked *