Camelia Mocanu 2 Posted August 30, 2021 Share Posted August 30, 2021 Hi all, I have plotted my data using a scatter plot and I have three populations I want to highlight: the black, the green and the red. To do so, I need to specify conditions both for X and Y axis. For example: if value on X Link to comment Share on other sites More sharing options...
Fabian Duerr Posted August 30, 2021 Share Posted August 30, 2021 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 More sharing options...
Danny Yu Posted September 8, 2021 Share Posted September 8, 2021 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now