Rotation

These IronPython scripts below show how to modify any of the Scatter Plot visualization settings found on the Rotation tab of the Scatter Plot Properties dialog box in the Spotfire user interface.
Note

In each of the scripts below, it is assumed that the MyVis variable references the targeted visualization. See here for more information about referencing visualizations.

Change Scatter Plot Rotation Tab Options:

  1. Change the “Rotate by” custom expression
  2. Rotate clockwise or counter-clockwise
from Spotfire.Dxp.Application.Visuals import *

myVis = myVis.As[Visualization]()

# 1. Change the "Rotate by" custom expression
myVis.RotationAxis.Expression = "Avg([Rotation Column])"

# 2. Rotate clockwise or counter-clockwise
myVis.RotationAxis.RotateClockwise = True  #Clockwise
# OR
myVis.RotationAxis.RotateClockwise = False  #Counter-clockwise
Note

If you aren't sure how to write a specific custom expression correctly from scratch, start by building the expression interactively using the Spotfire user interface. Once your custom expression is working correctly, right-click on the custom expression input box selector(s) and choose Custom Expression. You can then copy the expression shown into your IronPython script.

Welcome!

The purpose of this website is to provide a comprehensive, accurate, and efficient IronPython reference for Spotfire developers.