From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: babel, matlab export plot to png fails Date: Wed, 16 Aug 2017 17:25:57 +0000 Message-ID: <1F5D249B-61D1-490A-8C46-48543A021F15@ucsd.edu> References: <87shgveujl.fsf@mat.ucm.es> <5678702d-9fdc-74ff-443c-fa979185ffca@ossau.homelinux.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1di251-0007o9-1f for emacs-orgmode@gnu.org; Wed, 16 Aug 2017 13:26:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1di24w-0003TD-4j for emacs-orgmode@gnu.org; Wed, 16 Aug 2017 13:26:07 -0400 Received: from iport-acv3-out.ucsd.edu ([132.239.0.4]:5309) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1di24v-0003Pr-Jx for emacs-orgmode@gnu.org; Wed, 16 Aug 2017 13:26:02 -0400 In-Reply-To: <5678702d-9fdc-74ff-443c-fa979185ffca@ossau.homelinux.net> Content-Language: en-US Content-ID: <0ADDE545B3E3D54D8323FD7BE82EF1AA@AD.UCSD.EDU> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Neil Jerram Cc: "emacs-orgmode@gnu.org" > On Aug 15, 2017, at 2:12 AM, Neil Jerram wrote= : >=20 > On 13/08/17 10:33, Uwe Brauer wrote: >> Hi >>=20 >> I would like to execute some matlab code in org file (using GNU emacs 26 >> and the git version of org mode) and save the result of the plot command >> in a png file, so I tried >>=20 >> #+begin_src matlab :session :exports both :file testplot.png >> t=3D[0:0.1:1]; >> y=3Dsin(t); >> plot(t,y) >> print -dpng testplot.png >> #+end_src >>=20 >> And also >> #+begin_src matlab :results output latex :exports results :file testplo= t.png >> t=3D[0:0.1:1]; >> y=3Dsin(t); >> plot(t,y) >> print -dpng testplot.png >> #+end_src >>=20 I do not have matlab, but looking at the code in ob-matlab.el and ob-octave= .el, it seems that the usual header args should do: : :results graphics :file testplot.png and delete the print statement in the last line. I do not see this documented in (info "(org) results") as it is language sp= ecific. Following the page that (info "(org) Languages") points to leads to= =20 `http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave-matlab.= html which looks like it is out-of-date. (Specifically, org-babel-execute:matla= b calls org-babel-execute:octave which *now* sets the result to nil and pla= ces the print statement as needed when ~:results graphics~ is specified, bu= t the example will fail under the new regime.) Maybe a link to the Languages worg page should be added in (info "(org) res= ults") and (sigh) maybe the worg pages can be updated to include revision d= ates? HTH, Chuck