Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example of a more readable color scale #4

Closed
wants to merge 2 commits into from
Closed

Add an example of a more readable color scale #4

wants to merge 2 commits into from

Conversation

maximepiard
Copy link

Small try to give the color mode a more readable scale as suggested by @waldyrious in #1 (comment) (plasma scale chosen in the colormap package)

Examples :

  • Can't Feel My Face
    image
  • Bad Romance
    image

This is my first PR, hope everything is ok ! I may try to implement the other matrix' forms (proposed here #1 (comment)) after that but I need to dig more into the code.

Great project btw 👏

@colinmorris
Copy link
Owner

Thanks for the PR! Could you give a little explanation about why you think this color map is better?

Looking at those two example songs, I think I actually prefer their appearance under the current scheme. My main problem with the plasma colormap here is that the yellows really fade into the white background (and to a lesser degree so do the oranges and pinks).

It was a long time ago that I wrote this, but I remember doing a fair bit of experimentation with colors, including a lot of commonly-used out-of-the-box colormaps such as plasma, viridis, cubehelix etc. before settling on the current scheme.

The thing about plasma, viridis etc. is that they're intended for data that varies quantitatively along some axis, with larger quantities represented by increasingly bright colors (or vice versa). They make it especially easy to pick out extreme values, because our eyes are good at perceiving differences in lightness.

My goal in coloring the matrices was not primarily to make it easy to distinguish words according to whether they first appear near the beginning or end of the song. I just wanted repeated patterns off the diagonal to have distinctive appearances (e.g. to make it easy to tell at a glance whether two 'stripey rectangles' off the main diagonal are instances of the same pattern, or whether a diagonal segment is a subsequence of a larger repeating pattern somewhere else).

So what I ended up using was more like a qualitative colormap. I fixed a lightness and saturation and then just used the whole range of hues within that circle.

(At one point I even experimented with assigning those colors randomly, but decided that it was often useful to assign similar colors to words that first appear around the same time.)

@maximepiard
Copy link
Author

@colinmorris Thanks for answering !

My goal in coloring the matrices was not primarily to make it easy to distinguish words according to whether they first appear near the beginning or end of the song. I just wanted repeated patterns off the diagonal to have distinctive appearances

I think you perfectly summarized it. You wanted a more detailed scale to distinguish the most word changes in 2 similar patterns. On the other hand I thought it was more interesting to spot easily words that came from the beginning of the song, and those that were introduced the latest.

Seing your version again made me realise we can see much more by zooming in more into the grid. The only thing I find confusing is that I have to check the diagonal often to see where a color first appear, because it's less intuitive from the start.

Anyway, thanks again for the answer ! From your point of view I understand this PR adds no real value to the project so I have no problem for closing this. 🙂

@maximepiard maximepiard closed this Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants