Compare Slices of 2D Arrays¶
Unfortunately the interactive plots do not work on a website because there is no Python kernel running. All of the interactive outputs have therefore been replaced by gifs of what you should expect.
heatmap_slicer() function allow you to compare horizontal and/or vertical
slices of an arbitrary number of 2D arrays using just your mouse.
x = np.linspace(0, np.pi, 100) y = np.linspace(0, 10, 200) X,Y = np.meshgrid(x, y) data1 = np.sin(X) + np.exp(np.cos(Y)) data2 = np.cos(X) + np.exp(np.sin(Y)) fig, axes = heatmap_slicer(x, y, (data1,data2),slices='both', heatmap_names=('dataset 1','dataset 2'), labels=('Some wild X variable','Y axis'), interaction_type='move')
interaction_type argument controls how the plot updates. You can either use
'move' in which case all mouse movements will be tracked, or you can use
and the plot will only update when you click on one of the arrays.
slices argument controls which slices to compare. It accepts values of