mwaskom/seaborn — pull request #267 by phobson (2014-08-29 17:14:12+00:00)
Title: PairedGrid fails when `vars` is an array

Consider the following test case (python 3):

```python
from io import StringIO

import numpy as np
import matplotlib.pyplot as plt
import pandas
import seaborn

%matplotlib inline
seaborn.set(style='ticks')

data = StringIO("""\
Event Influent Effluent
1 5.003946 2.708050
2 4.948760 2.079442
3 4.442651 1.609438
4 3.988984 2.302585
5 4.077537 2.890372
6 4.553877 3.091042
7 4.644391 3.091042
8 4.276666 3.610918
9 4.465908 2.944439
10 4.553877 3.663562
11 4.510860 3.555348
12 4.174387 2.484907
13 3.891820 1.945910
14 3.135494 1.386294
15 3.688879 2.564949
16 2.708050 1.945910
17 3.401197 2.772589
18 3.295837 3.044522
19 3.737670 2.564949
20 4.744932 4.158883
""")

TSS = pandas.read_table(data, sep='\s+')
paired_grid = seaborn.PairGrid(TSS, vars=np.array(['Influent', 'Effluent']))
paired_grid.map_upper(seaborn.kdeplot, cmap="Blues_d")
paired_grid.map_lower(plt.scatter)
paired_grid.map_diag(seaborn.kdeplot, lw=3, legend=False)
```

This will fail since `paired_grid.square_grid` will actually be `np.array([True True]).

So setting `PairedGrid.square_grid` with `self.square_grid = np.all(x_vars == y_vars)` seems to fix this.

Curious what you think.

And as always, thanks for the awesome and hard work you've put into this. So valuable.