diff --git a/module2/ressources/rr_org/init.el b/module2/ressources/rr_org/init.el index 4e8308c4b1c39222ca7c971328ff16b4a6333123..e833e545e15f14df4ba4a50a05f5d9986e8aa1b4 100644 --- a/module2/ressources/rr_org/init.el +++ b/module2/ressources/rr_org/init.el @@ -178,7 +178,7 @@ Entered on %U '("P" "#+begin_src python :results output :session :exports both\n\n#+end_src" "\n\n")) (add-to-list 'org-structure-template-alist - '("PP" "#+begin_src python :results output file :session :var matplot_lib_filename=(org-babel-temp-file \"figure\" \".png\") :exports both\nimport matplotlib.pyplot as plt\n\nimport numpy\nx=numpy.linspace(-15,15)\nplt.figure(figsize=(10,5))\nplt.plot(x,numpy.cos(x)/x)\nplt.tight_layout()\n\nplt.savefig(matplot_lib_filename)\nprint(matplot_lib_filename)\n#+end_src" "\n\n")) + '("PP" "#+begin_src python :results file :session :var matplot_lib_filename=(org-babel-temp-file \"figure\" \".png\") :exports both\nimport matplotlib.pyplot as plt\n\nimport numpy\nx=numpy.linspace(-15,15)\nplt.figure(figsize=(10,5))\nplt.plot(x,numpy.cos(x)/x)\nplt.tight_layout()\n\nplt.savefig(matplot_lib_filename)\nmatplot_lib_filename\n#+end_src" "\n\n")) (add-to-list 'org-structure-template-alist '("b" "#+begin_src shell :results output :exports both\n\n#+end_src" "\n\n")) diff --git a/module2/ressources/rr_org/init.org b/module2/ressources/rr_org/init.org index a0d4028f1b53269430527be7621c1b66b6da36fa..539f2381f1e462962db01543ec9ab74007a77fb0 100644 --- a/module2/ressources/rr_org/init.org +++ b/module2/ressources/rr_org/init.org @@ -334,7 +334,7 @@ To use this type

\n\n")) + '("PP" "#+begin_src python :results file :session :var matplot_lib_filename=(org-babel-temp-file \"figure\" \".png\") :exports both\nimport matplotlib.pyplot as plt\n\nimport numpy\nx=numpy.linspace(-15,15)\nplt.figure(figsize=(10,5))\nplt.plot(x,numpy.cos(x)/x)\nplt.tight_layout()\n\nplt.savefig(matplot_lib_filename)\nmatplot_lib_filename\n#+end_src" "\n\n")) #+end_src *** Bash "sh" code: To use this type