1. it is not obvious how to display a saved display (image)... 2. There is a an unnecessary ambiguity for the word 'display' here. it denotes type of scrap as well as scrap output flag upon saving 3. as I glue a display, it is _always_ shown twice. `plt.ioff()` doesn't help. here is the snippet for displaying image: ``` def display_image_scrap(nb, key): def stringToRGB(base64_string): imgdata = base64.b64decode(base64_string) image = Image.open(io.BytesIO(imgdata)) return image image = stringToRGB(nb.scraps[key].display['data']['image/png']) imsize_inches = (np.array(image.size) / 70).astype('int8').tolist() fig = plt.figure(figsize=imsize_inches) ax = fig.add_axes([0, 0, 1, 1]) ax.imshow(np.array(image), interpolation='antialiased') plt.axis('off') ``` due to (3) I had to disable image scraping for the moment. :(
plt.ioff()doesn't help.here is the snippet for displaying image:
due to (3) I had to disable image scraping for the moment. :(