Consider this code:
fig = Figure()
canvas = FigureCanvas(fig)
ax = fig.gca()
ax.text(0.0,0.0,"Test", fontsize=45)
ax.axis('off')
canvas.draw() # draw the canvas, cache the renderer
width, height = fig.get_size_inches() * fig.get_dpi()
images = np.fromstring(canvas.tostring_rgb(), dtype='uint8').reshape(int(height), int(width), 3)
So the problem I have, is that it saves the plot with a text "Test" on it. But suppose I have a plot, "AxesImages" matplotlib to be precise, how can I convert the image plot instead of the text? I have tried to change the ax.text(...) with ax.imshow(axesImage) but it threw and error.
Any suggestions?