Jump to content

How do you set the AxisRange from a python script for a continuous ColorAxis on a Spotfire Scatter Plot visualization


Robert Slavens 2

Recommended Posts

  • 2 weeks later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...