gregsexton / gregsexton/ob-ipython

Changing default :results causes plots to come out blank

Open
#93 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
742
Forks
107
PR merge metrics
No merged PRs in 30d

Description

I have the following code in my init.el:

; Set default :results to output
(setq org-babel-default-header-args
(cons '(:results . "output replace")
(assq-delete-all :results org-babel-default-header-args)))

The effect of this is to change the :results setting in org-babel-default-header-args:

((:results . "output replace")
(:session . "none")
(:exports . "code")
(:cache . "no")
(:noweb . "no")
(:hlines . "no")
(:tangle . "no"))

After making this change, when I plot a graph using ob-ipython, e.g.,
# +begin_src ipython :session :file ttt.png :results file

plt.plot([1,1,2.5],[2,3,4])
# +end_src

the result displays as a blank square in my Emacs buffer. It displays fine if I comment out the code above.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.