Jump to content

Recommended Posts

Posted

Hi;

I create scatter plot with IronPython (2.7.7) (Spotfire 7.11): I have 1 to N columns on Y axis. Code excerpt below:

plot = page.Visuals.AddNew[scatterPlot]()

plot.Data.DataTableReference = dataTable

plot.XAxis.Expression = ""

plotCols = getPlotCols(dataTable)

plot.MarkerSize = 2.0

plot.ShapeAxis.DefaultShape = MarkerShape(MarkerType.Circle)

plot.YAxis.Expression = plotColsEverything so far work fine, but I get the following message:

with multiple columns on y axis, "(Column Names)" has to be selected on X-axis or used to color by ...

 

When I click color by and select (Column Names), I get exactly the desired output.

How can I achieve this from IronPython script

I tried adding the same expression "[Col1], [Col2], ... as I did with YAxis

plot.ColorAxis.Expression = plotCols I would be grateful for example.

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...