Comments (5)
Probably a dup of #16.
from jupyter.
Is your Org version >= 9.2? The semantics of :file
has changed in Org >= 9.2, you also need to specify :results link
for it to work. Specifying :file
by itself now means to write whatever the source block returns to file.
So it should be
#+BEGIN_SRC jupyter-python :session py :file ./test.png :results link
import matplotlib.pyplot as plt
plt.plot([1,2,3,4])
#+END_SRC
However if you specify :async yes
everything should work without :results link
. You may also need to add %matplotlib inline
before the plot call, see https://ipython.readthedocs.io/en/stable/interactive/plotting.html#id1.
Also note, there is an issue about consistent use and meaning of header arguments #40.
from jupyter.
I'm using org 9.1.9 - Updating to use async works. Thanks!
Any idea why the async is required?
from jupyter.
For :async yes
we have a custom result insertion method that doesn't go through org-mode
(the :async no
case does) and therefore doesn't follow the semantics of org-mode
s header arguments in the same way. The main reason this is done is so that when :async yes
is specified, results are inserted in the buffer as they come in, much like a Jupyter notebook. In the :async no
case, the results are collected first and then inserted (through org-mode
s result insertion) after the code block finishes.
I opened #40 to address the consistency of how header arguments are handled in the :async yes
vs :async no
case.
from jupyter.
Closing this as #40 is more relevant.
from jupyter.
Related Issues (20)
- Can't start REPL HOT 1
- Expose refreshing kernelspecs HOT 1
- Feasibility of connecting to kernel running behind tmux or screen HOT 8
- automatic display inline image? HOT 2
- No `org-babel-execute-function` for jupyter-python before loading PROPERTY header HOT 1
- Command to clear input HOT 2
- get the overlay content/view it in a dedicated buffer
- [Q] How do I wrap the results in a markdown block? HOT 1
- unable to start kernel HOT 1
- jupyter-session-with-random-ports: ‘jupyter kernel‘ failed to show connection file path HOT 9
- [BUG] Copying text from REPL buffer breaks kill ring HOT 1
- up arrow and down arrow key to navigate code HOT 2
- Enable Github Discussions HOT 1
- `org-element-cache` warnings when displaying text with ANSI colours
- :file header fails to create the link to the result
- [Upstream Regresion?] `jupyter-tramp-read-passwd`: `tramp-read-passwd nil` no longer works HOT 4
- jupyter source blocks in orgmode don't work with noweb function calls HOT 1
- How do I reconnect a kernel whose websocket has been closed without restarting emacs? HOT 3
- error in process filter: zmq--subprocess-filter: Error in ZMQ subprocess: error, HOT 5
- error in process sentinel: JSON readtable error: 27
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jupyter.