millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 123 forks source link

matplotlib inline plot working in GUI window but not in terminal mode with -nw option #891

Open spark159 opened 5 months ago

spark159 commented 5 months ago

matplotlib plot is not shown in terminal mode of emacs with -nw but working in GUI mode. Screenshot 2024-02-13 at 9 18 29 AM Screenshot 2024-02-13 at 9 19 44 AM

in terminal mode, output is just a dot '.' Is there way I can plot in terminal mode?

I already turn on Ein:Output Area Inlined Images toggle and ein:polymode

I am using Terminal on macOS Sonoma 14.2.1 And Ein version 20230827.325

Thanks!

bjodah commented 5 months ago

I don't think emacs supports iTerm2's extension API (see e.g. this comment). Images in VT200-like terminals are iffy at best. (not saying it can't be done, but it's a tall order and I guess it would require extensive work in the core of emacs).

spark159 commented 5 months ago

I am using "Terminal" default app in MacOS, not "iTerm" app. Do you think it would be hard to use display plot at Terminal too?

Thank you for help!

bjodah commented 5 months ago

The short answer is tp use the gui.

spark159 commented 5 months ago

I see.

Is this only MacOS problem or all other terminals not working including Linux? do you have any suggestion that I possibly try out to make this work or possible other way around to display the plot in terminal?

just too sad that I can't use this nice package in terminal...

bjodah commented 5 months ago

No you can't do this under Linux either. There's a terminal emulator called Kitty which can display images inline, but again emacs does not support it.

spark159 commented 5 months ago

Got it! Thanks!