Went with Matplotlib in the end (saving the image and then using ImageStim). Thank you for both suggestions. Very helpful.