[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] babel, matlab export plot to png fails
From: |
Berry, Charles |
Subject: |
Re: [O] babel, matlab export plot to png fails |
Date: |
Wed, 16 Aug 2017 17:25:57 +0000 |
> On Aug 15, 2017, at 2:12 AM, Neil Jerram <address@hidden> wrote:
>
> On 13/08/17 10:33, Uwe Brauer wrote:
>> Hi
>>
>> 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
>>
>> #+begin_src matlab :session :exports both :file testplot.png
>> t=[0:0.1:1];
>> y=sin(t);
>> plot(t,y)
>> print -dpng testplot.png
>> #+end_src
>>
>> And also
>> #+begin_src matlab :results output latex :exports results :file testplot.png
>> t=[0:0.1:1];
>> y=sin(t);
>> plot(t,y)
>> print -dpng testplot.png
>> #+end_src
>>
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
specific. Following the page that (info "(org) Languages") points to leads to
`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:matlab
calls org-babel-execute:octave which *now* sets the result to nil and places
the print statement as needed when ~:results graphics~ is specified, but the
example will fail under the new regime.)
Maybe a link to the Languages worg page should be added in (info "(org)
results") and (sigh) maybe the worg pages can be updated to include revision
dates?
HTH,
Chuck
- [O] babel, matlab export plot to png fails, Uwe Brauer, 2017/08/13
- Re: [O] babel, matlab export plot to png fails, John Kitchin, 2017/08/13
- Re: [O] babel, matlab export plot to png fails, Neil Jerram, 2017/08/15
- Re: [O] babel, matlab export plot to png fails, Uwe Brauer, 2017/08/16
- Re: [O] babel, matlab export plot to png fails,
Berry, Charles <=
- Re: [O] babel, matlab export plot to png fails, Eric S Fraga, 2017/08/16
- Re: [O] babel, matlab export plot to png fails, Berry, Charles, 2017/08/16
- Re: [O] babel, matlab export plot to png fails, Eric S Fraga, 2017/08/16
- Re: [O] babel, matlab export plot to png fails, Berry, Charles, 2017/08/16
- Re: [O] babel, matlab export plot to png fails, Uwe Brauer, 2017/08/16