##// END OF EJS Templates
Initial messing around....
Initial messing around. Latex tab completion will have to be done outside the normal completer logic as the completer line splitting logic uses \\ as a special character to split lines on. I probably want to put the latex completions first and it if finds any matches, don't do any other completion logic. The only issue is that might short circuit dir/path matching on windows. Hmmm.

File last commit:

r16120:24b93a1d
r17700:7b6d94ef
Show More
Image Browser.ipynb
123 lines | 16.6 KiB | text/plain | TextLexer

Image Browser

This example shows how to browse through a set of images with a slider.

In [13]:
%matplotlib inline
import matplotlib.pyplot as plt
In [1]:
from IPython.html.widgets import interact
In [11]:
from sklearn import datasets

We will use the digits dataset from scikit-learn.

In [12]:
digits = datasets.load_digits()
In [14]:
def browse_images(digits):
    n = len(digits.images)
    def view_image(i):
        plt.imshow(digits.images[i], cmap=plt.cm.gray_r, interpolation='nearest')
        plt.title('Training: %s' % digits.target[i])
        plt.show()
    interact(view_image, i=(0,n-1))
In [15]:
browse_images(digits)
No description has been provided for this image