Sublime Forum

How to output the matplotlib plot window inside SublimeREPL window?

#1

Hello Fellow Developers,

I had a question on how to show the matplotlib plot window inside SublimeREPL window instead of the plot showing in a separate window.

is it possible for the plot to show inside the same REPL window? if so, what steps shall I take to enable this in Sublime?

0 Likes

#4

What you want is not directly possible; you can’t host other windows inside of Sublime.

However, if SublimeREPL supports it, you could have matplotlib generate an image file to disk and have SublimeREPL load it (or you could just open it yourself; Sublime displays a few different image formats natively).

0 Likes

#5

Very, true, we can save the chart and open and show it in REPL.

This is a solution if you just want to view the chart, and not interact with it.

There seems to be a Helium package that may enable SublimeREPL to display the chart within the REPL window, however, I have yet to replicate this solution in Sublime.

I would like to ideally enable Sublime to be as functional as Jupyter Notebook, without requiring Jupyter via the iPython build system.

I’m currently learning Object-Oriented Programming (OOP) using Python. I’ll provide an update on this thread once I’ve developed or found a functional solution that tackle this feature request. The goal is to enable SublimeREPL to display MATPLOT charts within the same REPL window, and allowing users to interact with the chart seamlessly in that environment.

p.s, I have subscribed to your Youtube channel. I love using Sublime and plan to use it for my personal dev projects. I am still learning the best ways to use Sublime, while learning Data Science and ML.

0 Likes

#6

If there’s some way to make the plot window an “always on top” window then that could presumably suffice too, i.e. ST could have input focus but the plot window would remain visible.

0 Likes