Improve color guessing when first loading a data matrix

Issue #172 open
Anastasia Baryshnikova created an issue

The flow of checks should be: 1) Is it a binary matrix? (only 0, 1 and Empty in the data) If yes, set 0 to black and 1 to red. If not, check next.

2) Is it a matrix where with positive and negative values? (at least 1% positive data and 1% negative) If yes, set 0 to black, negatives to red and positives to green. If not, fall back to default strategy.

Comments (13)

  1. Robert Leach

    I think that if we do this, we should consider additionally implementing this guessing in 2 ways: behind the scenes when new data is first loaded, as is suggested here, and as a button in the slider edit dialog, as is proposed in issue #49. The buttons would be something akin to move selected to "median", "mean", "center", "0.0", etc:

    change_value_color.png

  2. Anastasia Baryshnikova reporter

    I think this may be overkill.. In my (biased) experience, I always knew where I wanted the color bars to be. And I wouldn't be able to 100% trust the buttons because it's not clear to me what is included in the calculation of the median/mean or center.. What if my matrix has many zeros? Do they get to contribute? I know this is probably an easy thing to implement, so we can leave it on the table, but I'm a little skeptical whether it will be practically useful or not..

  3. Anastasia Baryshnikova reporter

    You know what could be a nice compromise?

    Set color: [ Color picker ]

    Set value: [ Input box ]

    Suggested values:

    • Median = 0.523
    • Mean = 0.54
    • Center = 0.55

    So, the values are just suggestions and you'd see them before you enter them into the box.

  4. Robert Leach

    Perhaps, as an abstraction of "binary matrices", we could support "discreet matrices" (i.e. all values are integers). The default could be (if there are 2 values in the population) RedGreen with the values set as the boundaries or (if there are >2 values), the median gets black and the median-1 gets red and the median+1 gets green. They can add colors as desired.

    If the median happens to be a min or max, we'd have to have a special case where the median value gets incremented/decremented or something.

  5. Log in to comment