mwaskom/seaborn — pull request #374 by sdvillal (2014-11-20 15:53:24+00:00)
Title: Heatmap missing fixes

This snippet shows a bug in the current implementation of heatmaps over masked arrays

```python
import seaborn as sns
import numpy as np
import pandas as pd

cmap = sns.cubehelix_palette(light=.95, as_cmap=True)
cmap.set_bad('k', 1.) # masked elements are black

df = pd.DataFrame(data={'a': [1, 1, 1],
'b': [2, np.nan, 2],
'c': [3, 3, np.nan]})

sns.heatmap(df, mask=df.isnull(), cmap=cmap)
```

With the current implementation, we get this inverted mask:

![mask-not-reversed](https://cloud.githubusercontent.com/assets/642252/5127578/60141c98-70d5-11e4-89a1-e6094f60ad3c.png)

These commits fix it, so we get the expected heatmap

![mask-properlly-reversed](https://cloud.githubusercontent.com/assets/642252/5127589/75f1e040-70d5-11e4-9034-83b08b66039b.png)

They also add a comment for the *mask* parameter to heatmap.

A different issue is that, if no mask is passed, missing values seem to be represented by the color of the minimum, which arguably is not correct. I will open an issue to discuss.