* Org-plot/org-babel-gnuplot not working @ 2014-11-04 1:44 Garreau, Alexandre 2014-11-04 2:47 ` John Hendy 2014-11-04 3:48 ` John Hendy 0 siblings, 2 replies; 6+ messages in thread From: Garreau, Alexandre @ 2014-11-04 1:44 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 774 bytes --] Hello, when I do `org-plot/gnuplot' on a org-plot figure it says “org-plot/gnuplot: Cannot open load file: gnuplot”. I also tried org-babel-gnuplot, and on an example code, C-c C-c says “org-babel-execute-src-block: No org-babel-execute function for gnuplot!”. I’m under Debian Testing (Jessy), have version "GNU Emacs 24.3.1 (i586-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-09-07 on babin, modified by Debian", with Org version 7.9.3f, I’ve installed gnuplot-x11 package via distro, then gnuplot-mode via distro *and* elpa, then org-babel via ELPA (not found in distro), and I put some come in my init.el to activate gnuplot, according this: <http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html>. What could be the cause? [-- Attachment #2: Type: application/pgp-signature, Size: 948 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-plot/org-babel-gnuplot not working 2014-11-04 1:44 Org-plot/org-babel-gnuplot not working Garreau, Alexandre @ 2014-11-04 2:47 ` John Hendy 2014-11-04 3:48 ` John Hendy 1 sibling, 0 replies; 6+ messages in thread From: John Hendy @ 2014-11-04 2:47 UTC (permalink / raw) To: Garreau, Alexandre; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1322 bytes --] On Nov 3, 2014 7:44 PM, "Garreau, Alexandre" <galex-713@galex-713.eu> wrote: > > Hello, when I do `org-plot/gnuplot' on a org-plot figure it says > “org-plot/gnuplot: Cannot open load file: gnuplot”. > > I also tried org-babel-gnuplot, and on an example code, C-c C-c says > “org-babel-execute-src-block: No org-babel-execute function for > gnuplot!”. > > I’m under Debian Testing (Jessy), have version "GNU Emacs 24.3.1 > (i586-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-09-07 on babin, > modified by Debian", with Org version 7.9.3f, I’ve installed gnuplot-x11 > package via distro, then gnuplot-mode via distro *and* elpa, then org-babel > via ELPA (not found in distro), and I put some come in my init.el to > activate gnuplot, according this: > <http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html>. > > What could be the cause? Let me take a look. I believe I wrote that worg page a long time ago. I no longer use gnuplot but would be happy to try and reproduce! Could you post the gnuplot/babel relevant stuff from your .emacs? For the record, I'm on Org 8+ and there have been a lot of changes since 7.9, so my results and yours may vary. Then again, I would have written that from 7.x, so who knows. More in a bit, unless someone beats me :) John [-- Attachment #2: Type: text/html, Size: 1695 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-plot/org-babel-gnuplot not working 2014-11-04 1:44 Org-plot/org-babel-gnuplot not working Garreau, Alexandre 2014-11-04 2:47 ` John Hendy @ 2014-11-04 3:48 ` John Hendy 2014-11-05 0:33 ` Garreau, Alexandre 1 sibling, 1 reply; 6+ messages in thread From: John Hendy @ 2014-11-04 3:48 UTC (permalink / raw) To: Garreau, Alexandre; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2280 bytes --] Greetings, Just took a look at the worg page and gave it a whirl in the style of Org 8.x. Indeed, the babel/setup section is oudated, and I'm not sure if 7.9.3f is on the "old style" or new style. I thought there was a sort of "pre-8.0" version of Org that still adhered to the newer syntax. In any case, take a look at the attached .org file with my minimal setup which works successfully for me. Hopefully it's self-explanatory. I attached my pdf export as well. I was going to update worg while I was at it... but it seems to be down for me, at least intermittently. Very odd, as downforeveryoneorjustme.com says orgmode.org is up... but I can't ping it and get webpage not available in both Chrome and Firefox?? In any case, hopefully this gets you going and I'll update the worg page. Please note the section about gnuplot.el. Perhaps at one time this needed to be downloaded from somewhere else. It shipped with my linux package, and I downloaded gnuplot right from their site, which also contains gnuplot.el, so you should be all set as long as you have gnuplot installed/in your path (try going `$ gnuplot --version` from a terminal) and copy gnuplot.el to one of your load-path locations. Redundant to put that in the email as it's in the attached, but for skimmers who aren't going to download I thought I'd say it twice :) Best regards, John On Mon, Nov 3, 2014 at 7:44 PM, Garreau, Alexandre <galex-713@galex-713.eu> wrote: > Hello, when I do `org-plot/gnuplot' on a org-plot figure it says > “org-plot/gnuplot: Cannot open load file: gnuplot”. > > I also tried org-babel-gnuplot, and on an example code, C-c C-c says > “org-babel-execute-src-block: No org-babel-execute function for > gnuplot!”. > > I’m under Debian Testing (Jessy), have version "GNU Emacs 24.3.1 > (i586-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-09-07 on babin, > modified by Debian", with Org version 7.9.3f, I’ve installed gnuplot-x11 > package via distro, then gnuplot-mode via distro *and* elpa, then org-babel > via ELPA (not found in distro), and I put some come in my init.el to > activate gnuplot, according this: > <http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html>. > > What could be the cause? [-- Attachment #2: gnuplot-test.org --] [-- Type: application/octet-stream, Size: 1762 bytes --] * setup - Created the following (saved to =~/Desktop/gnuplot-test/min-config=) #+begin_src min-config (add-to-list 'load-path "~/.elisp/org.git/lisp/") ;;(add-to-list 'load-path "~/.elisp/org.git/contrib/lisp") (add-to-list 'load-path "~/.elisp/site-lisp") (org-babel-do-load-languages 'org-babel-load-languages '((gnuplot . t))) #+end_src - installed gnuplot (Arch linux repo) - the pkg shipped with a =/usr/share/emacs/site-lisp/gnuplot.el= - I downloaded gnuplot-4.6.6 from the official site; it alco contains gnuplot.el - I don't think downloading it elsewhere is necessary[fn:1] - copied this file to =~/.elisp/site-lisp= (which is in load-path above) Ran this file as follows: - =$ emacs -Q= - =M-x load-file RET ~/Desktop/gnuplot-test/min-config= - =C-x C-f ~/Desktop/gnuplot-test/gnuplot-test.org= - Tried both on the contents in the next headling: - =C-c C-c= on each block, checking .png output - =C-c C-e l p= to export to Latex, which also worked That's it! * a couple tests table: #+tblname: data-table | x | y1 | y2 | |---+----+----| | 0 | 3 | 6 | | 1 | 4 | 7 | | 2 | 5 | 8 | plot code #+begin_src gnuplot :var data=data-table :export both :file table.png reset plot data u 1:2 w lines lw 2 title 'Data Set 1' #+end_src #+RESULTS: [[file:table.png]] #+begin_src gnuplot :exports both :file functions.png reset set title "Putting it All Together" set xlabel "X" set xrange [-8:8] set xtics -8,2,8 set ylabel "Y" set yrange [-20:70] set ytics -20,10,70 f(x) = x**2 g(x) = x**3 h(x) = 10*sqrt(abs(x)) plot f(x) w lp lw 1, g(x) w p lw 2, h(x) w l lw 3 #+end_src #+RESULTS: [[file:functions.png]] * Footnotes [fn:1] For example, googling "gnuplot.el" led me to https://github.com/bruceravel/gnuplot-mode/ [-- Attachment #3: gnuplot-test.pdf --] [-- Type: application/pdf, Size: 164780 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-plot/org-babel-gnuplot not working 2014-11-04 3:48 ` John Hendy @ 2014-11-05 0:33 ` Garreau, Alexandre 2014-11-05 0:42 ` John Hendy 0 siblings, 1 reply; 6+ messages in thread From: Garreau, Alexandre @ 2014-11-05 0:33 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1419 bytes --] Le 04/11/2014 à 03h47, John Hendy a écrit : > Could you post the gnuplot/babel relevant stuff from your .emacs? This: #+BEGIN_SRC emacs-lisp ;; active Babel languages (org-babel-do-load-languages 'org-babel-load-languages '((gnuplot . t))) ;; add additional languages with '((language . t))) #+END_SRC Of course it’s not enough. It doesn’t work. I saw this here: <http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html> (got the link on #org-mode asking for help). Le 04/11/2014 à 04h48, John Hendy a écrit : > Just took a look at the worg page and gave it a whirl in the style of > Org 8.x. Indeed, the babel/setup section is oudated, and I'm not sure > if 7.9.3f is on the "old style" or new style. I thought there was a > sort of "pre-8.0" version of Org that still adhered to the newer > syntax. In any case, take a look at the attached .org file with my > minimal setup which works successfully for me. Hopefully it's > self-explanatory. I attached my pdf export as well. I already tried to eval your code, and it… oh… it turns out it works… but… it’s the same that mine in my .emacs.d/init.el. /And then, once more, it suddenly worked without any explanation/ Ok it works it’s great. Does any plot previewing exist? I mean, with the image *in* the buffer, like for LaTeX preview feature (maybe I should ask in a separate mail…)? [-- Attachment #2: Type: application/pgp-signature, Size: 948 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-plot/org-babel-gnuplot not working 2014-11-05 0:33 ` Garreau, Alexandre @ 2014-11-05 0:42 ` John Hendy 2014-11-05 0:57 ` Garreau, Alexandre 0 siblings, 1 reply; 6+ messages in thread From: John Hendy @ 2014-11-05 0:42 UTC (permalink / raw) To: Garreau, Alexandre; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2440 bytes --] On Tue, Nov 4, 2014 at 6:33 PM, Garreau, Alexandre <galex-713@galex-713.eu> wrote: > Le 04/11/2014 à 03h47, John Hendy a écrit : >> Could you post the gnuplot/babel relevant stuff from your .emacs? > > This: > > #+BEGIN_SRC emacs-lisp > ;; active Babel languages > (org-babel-do-load-languages > 'org-babel-load-languages > '((gnuplot . t))) > ;; add additional languages with '((language . t))) > #+END_SRC > > Of course it’s not enough. It doesn’t work. I saw this here: > <http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.html> > (got the link on #org-mode asking for help). What's not enough? The docs also state (a bit above the babel lines): #+begin_quote Babel support for gnuplot requires that gnuplot be installed on your system, along with gnuplot.el, an Emacs major mode for interacting with gnuplot. You can install gnuplot.el with ELPA. #+end_quote From my min-config, you can see that enabling gnuplot in babel and pointing to gnuplot.el are enough. Is this what you mean (that you need gnuplot.el + the babel lines)? > Le 04/11/2014 à 04h48, John Hendy a écrit : >> Just took a look at the worg page and gave it a whirl in the style of >> Org 8.x. Indeed, the babel/setup section is oudated, and I'm not sure >> if 7.9.3f is on the "old style" or new style. I thought there was a >> sort of "pre-8.0" version of Org that still adhered to the newer >> syntax. In any case, take a look at the attached .org file with my >> minimal setup which works successfully for me. Hopefully it's >> self-explanatory. I attached my pdf export as well. > > I already tried to eval your code, and it… oh… it turns out it works… > but… it’s the same that mine in my .emacs.d/init.el. You mean you didn't change your .init.el and yet it began working when the exact same setup was previously not working? > /And then, once more, it suddenly worked without any explanation/ > > Ok it works it’s great. Does any plot previewing exist? I mean, with the > image *in* the buffer, like for LaTeX preview feature (maybe I should > ask in a separate mail…)? See org-toggle-inline-images: - http://orgmode.org/manual/Handling-links.html#fnd-6 After C-c C-c on both blocks in the test file I sent (you need the the resultant image links in the file), I did C-c C-x C-v per the manual and get the attached as the result. Best regards, John [-- Attachment #2: 2014-11-04_184127.png --] [-- Type: image/png, Size: 59111 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-plot/org-babel-gnuplot not working 2014-11-05 0:42 ` John Hendy @ 2014-11-05 0:57 ` Garreau, Alexandre 0 siblings, 0 replies; 6+ messages in thread From: Garreau, Alexandre @ 2014-11-05 0:57 UTC (permalink / raw) To: John Hendy; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1233 bytes --] Le 05/11/2014 à 01h42, John Hendy a écrit : > On Tue, Nov 4, 2014 at 6:33 PM, Garreau, Alexandre > <galex-713@galex-713.eu> wrote: >> Le 04/11/2014 à 03h47, John Hendy a écrit : > What's not enough? The docs also state (a bit above the babel lines): > From my min-config, you can see that enabling gnuplot in babel and > pointing to gnuplot.el are enough. Is this what you mean (that you > need gnuplot.el + the babel lines)? > You mean you didn't change your .init.el and yet it began working when > the exact same setup was previously not working? Yes. I don’t understand neither. Maybe some stupid thing like forgetting to re-byte-compile init.el… >> /And then, once more, it suddenly worked without any explanation/ >> >> Ok it works it’s great. Does any plot previewing exist? I mean, with the >> image *in* the buffer, like for LaTeX preview feature (maybe I should >> ask in a separate mail…)? > > See org-toggle-inline-images: > - http://orgmode.org/manual/Handling-links.html#fnd-6 > > After C-c C-c on both blocks in the test file I sent (you need the the > resultant image links in the file), I did C-c C-x C-v per the manual > and get the attached as the result. Great \o/ [-- Attachment #2: Type: application/pgp-signature, Size: 948 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-11-05 0:57 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-04 1:44 Org-plot/org-babel-gnuplot not working Garreau, Alexandre 2014-11-04 2:47 ` John Hendy 2014-11-04 3:48 ` John Hendy 2014-11-05 0:33 ` Garreau, Alexandre 2014-11-05 0:42 ` John Hendy 2014-11-05 0:57 ` Garreau, Alexandre
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).