SciTools/iris — pull request #623 by niallrobinson (2013-07-19 10:30:17+00:00)
Title: Class to allow interactive exploration in cube plots

INITIAL PR FOR FEEDBACK - DO NOT MERGE

I wasn't getting enough attention on iris-dev so I decided to come and bug you on github instead :stuck_out_tongue_winking_eye:. Hope that's all right.

Problems/questions:
* It takes quite a long time to render a full 145x192 grid. I did a version using matplotlib rather than the iris plot functions and it was much snappier. Not sure what ```iplt``` does to is slowing it up so much. Can ```iplt``` processed images be cached somehow?
* Have I just rewritten the matplotlib animate function by mistake? I've never used it. Would it be useful here?
* I can't figure out how to integrate with ```iris.quickplot```. In particular, the ```_refresh_plot()``` method keeps re-plotting the colour bar.
* I suspect I can streamline some of the matplotlib stuff but this is the first time I've played with the widgets. Do I need to save the buttons in a dictionary, for instance.
* I was experimenting with using to cube_explorer plots simultaneously and it got a little buggy. I think I need to more explicitly tell the plot function which axes to plot to. Unfortunately, I can't find the plot function as a method of the (geo) axes, and I can't figure out how to pass an axes instance to the iplt function.

Here is an example of usage
```python
cube = iris.load_cube(iris.sample_data_path('GloSea4', 'ensemble_001.pp'))

def hook_main(ce):
ce.ax.coastlines()
ce.ax.set_title('Depth slices')

def hook_picker(ce):
ce.ax.set_title('Time series')

ce = CubeExplorer(cube, iplt.pcolormesh, [0, slice(None), slice(None)], cmap=mpl_cm.get_cmap('brewer_OrRd_09'), hook=hook_main)
ce.add_nav_buttons(0, ("Up", "Down"), slot=0)
ce.add_animate_buttons(0, ("Play", "Stop"), slot=1)
ce.add_picker(qplt.plot, hook=hook_picker)
ce.show()
```