Skip to content

Instantly share code, notes, and snippets.

@curiousily
Created May 2, 2020 19:53
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 curiousily/6d85503153a117db8384463eaf4cd152 to your computer and use it in GitHub Desktop.
Save curiousily/6d85503153a117db8384463eaf4cd152 to your computer and use it in GitHub Desktop.
def format_title(title):
sep_index = title.find(':') if title.find(':') != -1 else title.find('-')
if sep_index != -1:
title = title[:sep_index]
return title[:10]
fig, axs = plt.subplots(2, len(app_infos) // 2, figsize=(14, 5))
for i, ax in enumerate(axs.flat):
ai = app_infos[i]
img = plt.imread(ai['icon'])
ax.imshow(img)
ax.set_title(format_title(ai['title']))
ax.axis('off')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment