Skip to content

Instantly share code, notes, and snippets.

@MortisHuang
Created February 18, 2019 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MortisHuang/10d32edf962da8d28657fd04ace276b6 to your computer and use it in GitHub Desktop.
Save MortisHuang/10d32edf962da8d28657fd04ace276b6 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
from matplotlib.offsetbox import OffsetImage, AnnotationBbox
import numpy as np; np.random.seed(42)
# Generate data x, y for scatter and an array of images.
x = np.arange(20)
y = np.random.rand(len(x))
arr = np.empty((len(x),10,10))
for i in range(len(x)):
f = np.random.rand(5,5)
arr[i, 0:5,0:5] = f
arr[i, 5:,0:5] =np.flipud(f)
arr[i, 5:,5:] =np.fliplr(np.flipud(f))
arr[i, 0:5:,5:] = np.fliplr(f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment