Here is a data table. It's a little different to the screenshot above, but same idea. You can run the script to generate this plot:
I tried Rows > Color or Mark by Column, but it just added a little colored dot to each row in the table; I couldn't figure out how to actually rearrange the points in Graph Builder (or script) such that all blue ones come first, then all green ones, etc. Any ideas?