Export the plot image to memory

25 views
Skip to first unread message

Saurabh Sarkar

unread,
Feb 11, 2018, 2:30:17 PM2/11/18
to pyqtgraph
Hi -

I am trying to export the plot image to memory instead of a file in disk. Some what similar to matplotlib:

             buf = io.BytesIO()
             fig.savefig(buf,format = 'png')
             buf.seek(0)

or to an array :

            img_d = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
            img_d = img_d.reshape(fig.canvas.get_width_height()[::-1] + (3,))

Is there an equivalent approach in pyqtgraph?


Reply all
Reply to author
Forward
0 new messages