ob-sagemath icon indicating copy to clipboard operation
ob-sagemath copied to clipboard

When plotting ":exports both" fails but ":results file" works

Open balbirthomas opened this issue 4 years ago • 0 comments

This issue was observed on Sage 9.0 (packaged for Ubuntu 20.04), using the latest git master branch of ob-sagemath. If a sage plot command block is written as in

#+begin_src sage :file images/sin.png :exports both
  P = plot(sin(x), (0, 2*pi), figsize=[5, 4]); P
#+end_src

then after C-c C-c event though images/sin.png is generated it is not loaded into the org-file but instead the result shown are blank as in

#+RESULTS

Also the mini buffer shows a message stating no output was produced. However if the same plot block is written as

#+begin_src sage :results file
  P = plot(sin(x), (0, 2*pi), figsize=[5, 4]); P
#+end_src

Then the plot is indeed shown in the org file.

This problem does not occur using an older version of Sage 8.6.6 on Debian/Buster using the same git version of ob-sagemath

balbirthomas avatar Dec 27 '20 20:12 balbirthomas