Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipython-notebook layer does not show inline plots #192

Open
Eoksni opened this issue Oct 25, 2017 · 6 comments
Open

ipython-notebook layer does not show inline plots #192

Eoksni opened this issue Oct 25, 2017 · 6 comments

Comments

@Eoksni
Copy link

Eoksni commented Oct 25, 2017

Description :octocat:

ipython-notebook layer does not render inline plots, for example this cell

import matplotlib.pyplot as plt
from numpy import random
%matplotlib inline
def plotnormal():
    return plt.plot (random.randn (1000), random.randn (1000), 'o', alpha=0.3)
plotnormal ()
plt.show()

Reproduction guide 🪲

  • Start Emacs
  • Login to jupyter ein:notebooklist-login
  • Open notebook list ein:notebooklist-open
  • Open/create new notebook
  • Execute cell

Observed behaviour: 👀 💔

Single . (dot symbol) is shown as output

Expected behaviour: ❤️ 😄

Plot should be shown

System Info 💻

  • OS: windows-nt
  • Emacs: 25.2.1
  • Spacemacs: 0.200.9
  • Spacemacs branch: master (rev. 8e1af145)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: ivy
  • Layers:
(ipython-notebook docker yaml csv dmaz-projectile
                  (auto-completion :variables auto-completion-enable-help-tooltip t)
                  windows-scripts finance autohotkey restclient html dmaz-syntax-checking dmaz-org typescript markdown ivy dmaz git themes-megapack emacs-lisp shell)
  • System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
@millejoh
Copy link

Unfortunately I can't reproduce - everything is working on my Windows system.

Try this - put your cursor over the dot and execute C-c C-e.

If that doesn't do the trick can you do the following and post the results:

M-: (require 'ein-dev)
M-x ein:dev-show-sys-info

Thanks.

@Eoksni
Copy link
Author

Eoksni commented Oct 26, 2017

C-c C-e doesnt change anything, still just . character instead of a plot.
M-x ein:dev-show-sys-info

("EIN system info" :emacs-version "GNU Emacs 25.2.1 (x86_64-w64-mingw32)\n of 2017-04-25" :emacs-bzr-version nil :window-system w32 :emacs-variant nil :os
 (:uname "windows32 eoksni-win8 2.6.2 9200 ix86-pc AMD unknown MinGW\n" :lsb-release nil)
 :image-types
 (svg png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (svg png gif tiff jpeg xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "0.13.0" :source-dir "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/ein-20171022.1720/")
 :lib
 ((:name "websocket" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/websocket-20170829.457/websocket.elc" :featurep t :version-var websocket-version :version "1.5")
  (:name "request" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/request-20170131.1747/request.elc" :featurep t :version-var request-version :version "0.3.0")
  (:name "auto-complete" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/auto-complete-20170124.1845/auto-complete.elc" :featurep t :version-var nil :version nil)
  (:name "auto-complete" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/auto-complete-20170124.1845/auto-complete.elc" :featurep t :version-var nil :version nil)
  (:name "popup" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/popup-20160709.729/popup.elc" :featurep t :version-var popup-version :version "0.5.3")
  (:name "fuzzy" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/fuzzy-20150729.2037/fuzzy.elc" :featurep nil :version-var nil :version nil)
  (:name "pos-tip" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/pos-tip-20150318.813/pos-tip.elc" :featurep t :version-var pos-tip-version :version "0.4.6")
  (:name "python" :path "e:/eoksni-dir/portable/emacs/emacs-25.2-x86_64/share/emacs/25.2/lisp/progmodes/python.elc" :featurep t :version-var nil :version nil)
  (:name "markdown-mode" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/markdown-mode-20170615.1216/markdown-mode.elc" :featurep t :version-var markdown-mode-version :version "2.3-dev")
  (:name "helm" :path "e:/eoksni-dir/portable/emacs/dotspaceemacs/elpa/helm-core-20170613.1205/helm.elc" :featurep nil :version-var nil :version nil)))

It's probably just spacemacs issue, I was actually intended to post this issue to spacemacs repo, not here :) Tomorrow I will try with emacs -Q and see if an issue persists, then I can be sure if its spacemacs-related or not.

@manandearth
Copy link

manandearth commented Nov 17, 2017

I have the same issue on emacs 25 on Linux Manjaro.
I don't think it has to do with your mac..
ipython works as shell when executed by a pyton file but not in notebook enviornment.
it looks badly formatted too. all the lines including th ' In [2]' are stacked to the left with no indentation and the code that I type appear highlighted as if it is selected by C-..

@marcoleewow
Copy link

I am experiencing the same issue, @Eoksni have you found out the cause of this issue?

@Eoksni
Copy link
Author

Eoksni commented Nov 26, 2018

@marcoleewow No, I haven't - but I haven't looked into it too much. I tried with emacs -Q and it wasn't working too, so most likely it is not related to emacs configuration. I guess the problem is with emacs installation itself (I remember Windows Emacs wasn't rendering images untill I installed some additional libs) or something with the python (I wasn't using "pure" python, instead is was from anaconda environment). Or its a bug of this package.

@palbarede
Copy link

I had the same problem. First I checked that the graphics had really been created by looking into the .ipynb file (with a text editor) and opening it in HTML browser with jupyter notebook. Second (with M-x customize-group RTN ein), I toggled on the variable Ein:Output Area Inlined Images, restarted Emacs etc. and it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants