Robert Slavens 2 Posted February 1, 2021 Share Posted February 1, 2021 I have a Spotfire Scatter Plot visualization with a continuous color axis. I'd like to be able to change the range of that axis with a python script. I'm on Spotfire 10.3. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Raghav Rajaram Posted February 14, 2021 Share Posted February 14, 2021 Hi Robert, Please use this script: from Spotfire.Dxp.Data import * from System.Collections.Generic import List from Spotfire.Dxp.Application.Visuals import * from System.Drawing import Color from Spotfire.Dxp.Application.Visuals.ConditionalColoring import Coloring, ContinuousColorRule ,ConditionValue,IntervalMode vc = MyChart.As[scatterPlot]() colorRule = vc.ColorAxis.Coloring.Clear() cr = vc.ColorAxis.Coloring.AddContinuousColorRule() cr.IntervalMode = IntervalMode.Gradient cv1 = ConditionValue.CreateLiteral('1') cv2 = ConditionValue.CreateLiteral('1000') cr.Breakpoints.Add(cv1,Color.Red) cr.Breakpoints.Add(cv2,Color.Yellow) ----------------------------------------------------------------------------------------------------------------------------- Best, Raghav 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