Guest User

Untitled

a guest
Nov 23rd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. fig, ax = plt.subplots()
  2. ax.text(0.0,0.0,"Test", fontsize=45)
  3. ax.axis('off')
  4. ax.imshow(np.random.random((3,3)))
  5.  
  6. with io.BytesIO() as memf:
  7. fig.savefig(memf, format='PNG')
  8. memf.seek(0)
  9. img = Image.open(memf).convert('RGB')
  10. arr = np.asarray(img)
  11. img.show()
  12. plt.show()
  13. print(arr)
Add Comment
Please, Sign In to add comment