i´d like to change the Color of the Markers in a Scatterplot like this:


I make this with "Brushing 2D" but I´d like to make it with a macro, but i dont know how.

With this loop, i found the value, who are outsite the range.

In the loop i would like to change the color of this marker

        Set g = AO.Application.ActiveGraph

	Set pl = g.content.plot
	Set x = g.content.Plots.Item(1).Variable(1)
	Set y = g.content.Plots.Item(1).Variable(2)
	imax = x.valuescount

	For i = 1 To imax
		If CStr(x.Value(i)) <> "1,#QNAN" Or CStr(y.Value(i)) <> "1,#QNAN" Then
			nX = x.Value(i)
			nY = y.Value(i)
			If nX<minX Or nX>maxX Or nY<minY Or nY>maxY Then
	                        g.content.plots.Item(1).Marker(i).ForegroundColor = RED  <- this dosnt work, i need a likewise code who works :-)
				count = count + 1
			End If
			emty = emty + 1
		End If

	Next i

i use Statistica 8.0

Thanks for help and sorry for my english

Greetings from Germany