matplotlib interactive plot with slices of image
Question: How would I make an interactive plot like the one displayed here? I'd like to
show an image with x and y slices of the image taken at a point that can be
adjusted by clicking on the image.

![desired interactive plot where the image can be clicked to adjust the
position of the slices](http://i.stack.imgur.com/U0RWo.jpg)

I know this one was made in Chaco, but since Chaco isn't compatible with
python3, just matplotlib or bokeh would be preferable.


Answer: Using tacaswells suggestion, I found that the cross_section_2d in bubblegum
was just what I was looking for.

First I installed bubblegum from github
<https://github.com/Nikea/bubblegum.git>

Then the following sets up a cross_section image

    
    
    import matplotlib.pyplot as plt
    import numpy as np
    from bubblegum.backend.mpl.cross_section_2d import CrossSection
    fig= plt.figure()
    cs= CrossSection(fig)
    img= np.random.rand(100,100)
    cs.update_image(img)
    plt.show()
    

Thanks!

