Extract values from curve

from Spotfire.Dxp.Application.Visuals import ScatterPlot, FittingModels

#vis is a visualization script parameter 

scatterPlot=vis.As[ScatterPlot]()

#get the first curve

ds = scatterPlot.FittingModels[0].GetResultsDataSource()

#create or replace data table to store curve values
if Document.Data.Tables.Contains("Curve Fit Results"):
  table=Document.Data.Tables["Curve Fit Results"]
  table.ReplaceData(ds)
else:
  Document.Data.Tables.Add("Curve Fit Results", ds)



Source: https://tibbr.tibcommunity.com/tibbr/#!/messages/129194

No comments: