work on bycolor
Incorporated Richard's idea of "color_by".