Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

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

1 comment:

yiz said...

It works for me if-->

#get the first curve
ds = scatterPlot.FittingModels[1].GetResultsDataSource()