Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr-ressources
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Learning Lab
mooc-rr-ressources
Commits
c53385ce
Commit
c53385ce
authored
Aug 19, 2018
by
Konrad Hinsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected template for graphics from Python
parent
c27bfd23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
init.el
module2/ressources/rr_org/init.el
+1
-1
init.org
module2/ressources/rr_org/init.org
+1
-1
No files found.
module2/ressources/rr_org/init.el
View file @
c53385ce
...
@@ -178,7 +178,7 @@ Entered on %U
...
@@ -178,7 +178,7 @@ Entered on %U
'
(
"P"
"#+begin_src python :results output :session :exports both\n\n#+end_src"
"<src lang=\"python\">\n\n</src>"
))
'
(
"P"
"#+begin_src python :results output :session :exports both\n\n#+end_src"
"<src lang=\"python\">\n\n</src>"
))
(
add-to-list
'org-structure-template-alist
(
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"
"<src lang=\"python\">\n\n</src>"
))
'
(
"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"
"<src lang=\"python\">\n\n</src>"
))
(
add-to-list
'org-structure-template-alist
(
add-to-list
'org-structure-template-alist
'
(
"b"
"#+begin_src shell :results output :exports both\n\n#+end_src"
"<src lang=\"sh\">\n\n</src>"
))
'
(
"b"
"#+begin_src shell :results output :exports both\n\n#+end_src"
"<src lang=\"sh\">\n\n</src>"
))
...
...
module2/ressources/rr_org/init.org
View file @
c53385ce
...
@@ -334,7 +334,7 @@ To use this type <p and then TAB
...
@@ -334,7 +334,7 @@ To use this type <p and then TAB
#+begin_src emacs-lisp :tangle init.el
#+begin_src emacs-lisp :tangle init.el
(add-to-list 'org-structure-template-alist
(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" "<src lang=\"python\">\n\n</src>"))
'("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" "<src lang=\"python\">\n\n</src>"))
#+end_src
#+end_src
*** Bash "sh" code:
*** Bash "sh" code:
To use this type <b and then TAB
To use this type <b and then TAB
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment