This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.pyplot as plt | |
| fig = plt.figure() | |
| ax = fig.add_subplot(111) | |
| ax.plot([1, 2, 3]) | |
| ax.set_title('hi mom') | |
| ax.grid(True) | |
| ax.set_xlabel('time') | |
| ax.set_ylabel('volts') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def gsf_read(file_name): | |
| '''Read a Gwyddion Simple Field 1.0 file format | |
| http://gwyddion.net/documentation/user-guide-en/gsf.html | |
| Args: | |
| file_name (string): the name of the output (any extension will be replaced) | |
| Returns: | |
| metadata (dict): additional metadata to be included in the file | |
| data (2darray): an arbitrary sized 2D array of arbitrary numeric type | |
| ''' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| %matplotlib inline | |
| from IPython.html.widgets import interact | |
| def browse_images(data): | |
| num_frames = data.shape[0] | |
| def view_image(i): | |
| plt.imshow(data[i], cmap=plt.cm.hot, interpolation='none') | |
| plt.title('Frame %s' % i) |