Skip to content
Permalink
Browse files
fix problem with graph not being shown
issue was using :results output rather than :results value for graph
producing code.
  • Loading branch information
James Brusey committed Jun 13, 2022
1 parent d932030 commit 51368f6823f9a208ab275f2c94836340353c9095
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
@@ -1,7 +1,7 @@
#+title: Example research paper written with org mode
#+author: James Brusey
#+options: toc:nil
#+property: header-args:jupyter-python :session eg-sess :results output raw drawer :exports results
#+property: header-args:ipython :session eg-sess :results output raw drawer :exports results
#+latex_class: IEEEtran
#+latex_header: \input{header}
#+begin_abstract
@@ -37,17 +37,7 @@ While you can manually enter tables in org-mode, such as in autoref:table1.

A similar table can be produced using code, as in autoref:table2.

#+begin_src shell :results raw drawer
echo "hello"
#+end_src

#+RESULTS:
:results:
hello
:end:


#+BEGIN_SRC jupyter-python :results raw drawer
#+BEGIN_SRC ipython :results output raw drawer
import pandas as pd
import numpy as np
import tabulate
@@ -64,17 +54,18 @@ print(
#+END_SRC

#+RESULTS:
:
: #+caption: This table was produced from the all.csv data-set. label:table2
: #+attr_latex: :align lSS
: | Class | \protect{mean} | \protect{std} |
: |---------+------------------+-----------------|
: | a | 4.3 | 3.16394 |
: | b | -0.114247 | 1.00812 |
: | c | 4.72661 | 3.85745 |
:results:

#+caption: This table was produced from the all.csv data-set. label:table2
#+attr_latex: :align lSS
| Class | \protect{mean} | \protect{std} |
|---------+------------------+-----------------|
| a | 4.3 | 3.16394 |
| b | -0.114247 | 1.00812 |
| c | 4.72661 | 3.85745 |
:end:

#+BEGIN_SRC jupyter-python
#+BEGIN_SRC ipython :results value
%matplotlib inline
import pandas as pd
import numpy as np
@@ -86,7 +77,10 @@ plt.show()
#+END_SRC

#+RESULTS:
[[file:./.ob-jupyter/2b10c27d7fec897b3ebf8364b6da6e8b674ac4e0.png]]
:results:
# Out[11]:
[[file:./obipy-resources/kgRnMn.png]]
:end:


* Conclusions
BIN -12.8 KB (90%) 2022-03-replication/org/eg.pdf
Binary file not shown.

0 comments on commit 51368f6

Please sign in to comment.