Multiple Y columns scatter plot color by with IronPython

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 = "<minSize>"
plotCols = getPlotCols(dataTable)
plot.MarkerSize = 2.0
plot.ShapeAxis.DefaultShape = MarkerShape(MarkerType.Circle)
plot.YAxis.Expression = plotCols

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

(1) Answer

Login