Steve Ennis Posted November 13, 2019 Share Posted November 13, 2019 The link in the "IronPython Scripting in TIBCO Spotfire" for Add Line from Column Values to a Visualizationdoes not work. I would love to see this script because I am exactly trying to include a toggle button to add/remove specific lines(from column values) from my scatter plot. It appears it was once there but now the link doesn't work. Please fix. https://community.spotfire.com/wiki/ironpython-scripting-tibco-spotfire Thank you! Link to comment Share on other sites More sharing options...
Rayees Wani Posted November 14, 2019 Share Posted November 14, 2019 Can you please check now. The link should work. It should redirect you to: https://community.spotfire.com/wiki/how-add-line-column-values-visualization-tibco-spotfirer-using-ironpython-scripting Link to comment Share on other sites More sharing options...
Steve Ennis Posted November 14, 2019 Author Share Posted November 14, 2019 I get a "You are not authorized to access this page" on TIBCO's website. And I am logged into the commuunity at the time. I have also checked different browsers just in case it is a Google/Bing issue. The message is the same. But the "You are not authorized to access this page" is different (an improvement) from yesterday. Link to comment Share on other sites More sharing options...
Rayees Wani Posted November 14, 2019 Share Posted November 14, 2019 Is this the same for every other article link on the Iron Python script page Can you please provide the screenhot for more clarity. In the meantimebelow the script that you may find of help: from Spotfire.Dxp.Application.Visuals import * from Spotfire.Dxp.Application.Visuals.FittingModels import * #get the data table table=Document.Data.Tables["myDataTable"] # define vis as script parameter referring to your visualization lchart=vis.As[scatterPlot]() # Add a ColumnValuesLine fitting model fModel=lchart.FittingModels.AddNew(ColumnValuesLine) #Define the model fModel.DataTableReference=table fModel.XColumnReference=table.Columns["columnA"] fModel.YColumnReference=table.Columns["columnB"] #get the ReferenceCurve line=fModel.Line #set a custom name to the line line.CustomDisplayName="myLine" line.IsBackground=True line.LineStyle=LineStyle.Dot Link to comment Share on other sites More sharing options...
Steve Ennis Posted November 14, 2019 Author Share Posted November 14, 2019 Thank you! I haven't tried all the links but the many I have work just fine. This is the only one I have found to have link problems. Of course it is always the one you need! I have included a screenshot. Link to comment Share on other sites More sharing options...
Steve Ennis Posted November 14, 2019 Author Share Posted November 14, 2019 Screenshot of problem. Link to comment Share on other sites More sharing options...
Steve Ennis Posted November 14, 2019 Author Share Posted November 14, 2019 I already have the Lines from Columns added. Just wondering if there is a quick script to activate and turnoff the lines. Link to comment Share on other sites More sharing options...
Steve Ennis Posted November 14, 2019 Author Share Posted November 14, 2019 Below is the script I got to work. Copy lines 6-8 and alter to do multiple lines on 1 graph. Copy entire script and change vis to vis2 for multiple graphs on the same page. Thanks! from Spotfire.Dxp.Application.Visuals import * for fm in vis.As[scatterPlot]().FittingModels: if vis.TypeId == VisualTypeIdentifiers.ScatterPlot: lc = vis.As[scatterPlot]() for fm in lc.FittingModels: if fm.TypeId.DisplayName == "Line from Column Values" : if fm.Line.DisplayName == "YourCurveName": fm.Enabled=not(fm.Enabled) 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