Improve serial plotter graph colors #5656
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed that the multi-plot feature of the serial plotter has too few colors; it starts cycling after 4 colors. (Also I personally don't quite like the current colors.)
This patch increases the number of colors to 8 and uses a brighter, more saturated palette so that the colors are easy to distinguish even by people with reduced color perception (blue, red, green, amber, purple, gray, aqua, black).
I made this palette a while back for plots used on technical reports because I didn't like the default one on Excel/Gnumeric, and I think it looks rather nice for line plots. I thought it could be useful for Arduino too.
Example with 4 colors:

Example with 8 colors:

Code used to generate the example (in case you want to try this):