Short version:

I want a way to "dock" a matplotlib window-manager window into an Emacs window (similar to the image below), while still keeping the functionality (e.g. zooming) offered by matplotlib.

Long version:

I've finally decided to switch over to Python/matplotlib from Matlab for my data plotting, and as an Emacs user my choice of editor was already given.

There is however one feature from Matlab which I miss: to have the figures "docked" into the same frame, and being able to e.g. zoom in the figures. The zooming and otherwise manipulating figures graphically can already be done in the separate matplotlib frame opened by python.

I've also been able to bodge together a solution (see image below) wherein I save the figure to /tmp/matplotlib?.png and then open those files in a separate buffer. Then, using auto-image-file-mode and auto-revert-mode, I can get the plots to update automatically. Although, this method is very slow to update. The problem there is that I've now lost the possibility to manipulate the plots.

My question is therefore if there is a way to make Emacs render the matplotlib frame inside an Emacs window? Not just a static image file.

My bodged attempt at "docking" matplotlib windows

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.