Jump to content

How to use expression function to color my scatter plot


Camelia Mocanu 2

Recommended Posts

Instead of writing this custom expression I suggest to add a calculated column to your data set.

Something like... (I made up some random numbers)

case

 

when [your.X.colum] < 1300 and [your.Y.column] > 0 and [your.Y.column] < 75 then "black"

 

when [your.X.colum] < 10000 and [your.Y.column] >= 75 and [your.Y.column] < 200 then "red"

 

else "green"

 

endThen use this column for "color by" and assign the three colors manually

You can also use this in your custom expression. But it's cleaner to have it as a column.

Link to comment
Share on other sites

  • 2 weeks later...

It looks like a clustering problem. I would suggest you can try to use the function [k-means cluster] to create a clustered column instead of simply relying on expression. Then with the column on your scatter plot. It might be a better way to separate your data to be different groups.

You can watch this video to learn how to do it ==>https://www.youtube.com/watchv=GRaOnzWF1r8

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