Skip to content

Instantly share code, notes, and snippets.

View winston-song's full-sized avatar

Weixin Song winston-song

  • University of Oxford
View GitHub Profile
@thomasaarholt
thomasaarholt / horizontal_plot.py
Created March 17, 2020 12:48
Plotting horizontally in hyperspy using widgets
from ipywidgets.widgets import HBox, VBox
import matplotlib.pyplot as plt
def plot(s, orientation='horizontal'):
"""
Plot hyperspy signals horizontally using the %matplotlib widget interface.
Can also plot vertically using orientation='vertical'
"""
# if 1D signal, just plot normal