dccsillag / magma-nvim

Interact with Jupyter from NeoVim.
GNU General Public License v3.0
988 stars 50 forks source link

[Bug] Plot doesn't show up #44

Closed tempegarit closed 2 years ago

tempegarit commented 2 years ago

Describe the bug When I ran :MagmaEvaluateLine, a popup showed up with message Out[5]: ✓ Done but a plot didn't show up. I had run :checkhealth and all was ok.

To Reproduce Steps to reproduce the behavior:

  1. I wrote this code:

    
    import numpy as np
    import matplotlib.pyplot as plt
    
    x = np.linspace(-10, 10, 1000)
    y = np.sin(x**2)

plt.plot(x, y);



2. I ran `:MagmaInit` then chose `python3`.
3. I ran all the line using `:MagmaEvaluateLine`.

**Expected behavior**
The line `plt.plot(x,y);` should show a plot, but it only shows `Out[5]: ✓ Done`

**Screenshots**
![Screenshot 2022-04-25 061445](https://user-images.githubusercontent.com/44483328/165000704-d1f0fd12-c81a-4362-918f-1368bf666dfc.png)

**Desktop (please complete the following information):**
 - OS: [wsl (windows subsystem for Linux) windows 10]
dccsillag commented 2 years ago

I'm fairly sure that the issue here is that Ueberzug (i.e., what we use to show images) does not work on WSL; if I'm not mistaken, WSL on Windows 10 does not support graphical applications, and WSL on Windows 11 supports graphical applications via Wayland. Ueberzug requires X11.

Therefore, this ends up being just another instance of https://github.com/dccsillag/magma-nvim/issues/15.

dccsillag commented 2 years ago

I'm closing this as it's just a duplicate of #15 .