mwaskom/seaborn — pull request #180 by mwaskom (2014-04-25 16:48:28+00:00)
Title: Add cubehelix_palette function

This provides a flexible interface to the cubehelix palette system, which exists in matplotlib but is for some reason hidden.

Here are a few examples:

``` python
f, axes = plt.subplots(9, figsize=(8, 8))
for ax, s in zip(axes, np.linspace(0, 3, 10)):
pal = sns.cubehelix_palette(10, s)
ax.imshow([pal], interpolation="nearest")
ax.set(yticks=[], xticklabels=[])
```

![cubehelix_pal](https://cloud.githubusercontent.com/assets/315810/2803265/02a27a2c-cc99-11e3-9d44-edbef2f36ffa.png)

``` python
f, axes = plt.subplots(3, 3, figsize=(8, 8))
x, y = np.random.multivariate_normal([0, 0], [(1, .5), (.5, 1)], 1000).T
for ax, s in zip(axes.flat, np.linspace(0, 3, 9)):
cmap = sns.cubehelix_palette(start=s, rot=-.3, light=.98, as_cmap=True)
ax.hexbin(x, y, gridsize=20, cmap=cmap)
ax.set_axis_off()
f.tight_layout(h_pad=.5, w_pad=.5)
```

![cubehelix_hex](https://cloud.githubusercontent.com/assets/315810/2803292/6913c84c-cc99-11e3-9091-28b7de32c119.png)