Jump to content
We've recently updated our Privacy Statement, available here. ×

Iron Python script to set Lines & Curves Y-values column in ScatterPlot


Jonathan Guthrie

Recommended Posts

I have a Python script as follows to change the YColumnReference in Lines & Curves in a ScatterPlot (screenshot of parameters attached)

from Spotfire.Dxp.Application.Visuals import *

sp = vis.As[scatterPlot]()

for fm in sp.FittingModels:

if fm.TypeId.DisplayName == "Line from Column Values":

if fm.Line.DisplayName == "Fit Data":

print fm.Line.DisplayName

print FittingModelCurve

fm.YColumnReference = FittingModelCurve

print fm.YColumnReference

which displays the following Error:

Fit Data

Modified Arps (Secant).0

Traceback (most recent call last):

File "", line 9, in

TypeError: expected DataColumn, got str

Any thoughts

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...