Riley ODonnell Posted January 22, 2019 Share Posted January 22, 2019 I would like to add a polynomial curve to my visualisation with degree 4, a custom name, and set to update manually. I would then like to retrieve the parameters for the fitted model. The use case is fitting a model over multiple different time periods which can then be used in comparison calculations. I currently have the following script which is just able to add the polynomial fit of specified degree: from Spotfire.Dxp.Application.Visuals import ScatterPlot from Spotfire.Dxp.Application.Visuals.FittingModels import PolynomialFittingModel for viz in Document.Pages[1].Visuals: if viz.Title == "title: vis1 = viz.As[scatterPlot]() fm = vis2.FittingModels fm.Clear() fm.AddNew(PolynomialFittingModel).Degree = 4 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now