I'm working in R and am creating a 3-variable scatter plot, with x and y corresponding to position, and color given by z.
However, due to the specifics of my project, I couldn't use an existing color palette, and instead wrote a function directly converting data into rgb values.
I'm able to get the graph to look the way I want (the colors are correct), but I don't know how to create a suitable color key.
Assuming I've already done all the processing I want to do, and now have a data structure where column 1 is the x value, column 2 is the y value, column 3 is the rgb value I want to be the color of the point, and column 4 is the score used to generate the color hex value of a given point, how would I best display this as a scatter plot with color key?
I want the key to cover the entire color range and go from 0 to the max score.
The scores (column 4) don't need to be in the graph - they are just used to assign the color hex values, and to determine the range of the color key.
