Re: [O] babel, matlab export plot to png fails

2017-08-17 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga writes: > On Wednesday, 16 Aug 2017 at 12:33, Uwe Brauer wrote: > [...] >> BTW Eric, thanks for your reply, but a lot of your posts seem to be >> outside the thread, at least when I read them via gnus or thunderbird. >> Not sure who

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Uwe Brauer
> 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 just tried it, results in an empty png file.

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Berry, Charles
> On Aug 16, 2017, at 11:19 AM, Eric S Fraga wrote: > > On Wednesday, 16 Aug 2017 at 17:48, Berry, Charles wrote: > > [...] > >> org 9.0.9 and FWIW, I see this > > [...] > >> in org-babel-execute:octave > > But I get the following error message from babel/octave: > >

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Eric S Fraga
On Wednesday, 16 Aug 2017 at 17:48, Berry, Charles wrote: [...] > org 9.0.9 and FWIW, I see this [...] > in org-babel-execute:octave But I get the following error message from babel/octave: error: invalid call to script /usr/share/octave/4.0.3/m/miscellaneous/ans.m error: evaluating argument

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Berry, Charles
> On Aug 16, 2017, at 10:41 AM, Eric S Fraga wrote: > > On Wednesday, 16 Aug 2017 at 17:25, Berry, Charles wrote: > > [...] > >> 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: >> >> :

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Eric S Fraga
On Wednesday, 16 Aug 2017 at 17:25, Berry, Charles wrote: [...] > 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 This doesn't work for me, at least for octave. What

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Berry, Charles
> On Aug 15, 2017, at 2:12 AM, Neil Jerram 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

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Eric S Fraga
On Wednesday, 16 Aug 2017 at 12:33, Uwe Brauer wrote: [...] > BTW Eric, thanks for your reply, but a lot of your posts seem to be > outside the thread, at least when I read them via gnus or thunderbird. > Not sure who is the culprit. Does this one thread better? Thanks, eric -- : Eric S

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Adonay Felipe Nogueira
I think I know why, it seems that some email clients ignore the "In-Reply-To" field, and just assume that the reply is in regards to a matching "Subject" field. Mx. Fraga's email messages *do have* have a "Subject" field, however, strangely enough, the subject text doesn't appear in Gnus

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Eric S Fraga
On Wednesday, 16 Aug 2017 at 12:33, Uwe Brauer wrote: [...] > BTW Eric, thanks for your reply, but a lot of your posts seem to be > outside the thread, at least when I read them via gnus or thunderbird. > Not sure who is the culprit. > It makes reading it a bit difficult. Interesting and

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Uwe Brauer
>>> "Eric" == Eric S Fraga writes: > On Sunday, 13 Aug 2017 at 08:33, Uwe Brauer wrote: >> 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

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Uwe Brauer
> On 13/08/17 10:33, Uwe Brauer wrote: > I guess the problem is that the Matlab line "print -dpng testplot.png" > is correctly writing the plot to testplot.png, as you want, but then > org-mode is overwriting that file because of the ":file testplot.png". > I would try deleting

Re: [O] babel, matlab export plot to png fails

2017-08-16 Thread Uwe Brauer
>>> "John" == John Kitchin writes: > You need to get the contents of the png to get output. Maybe the type > command will do that. E.g. Add as the last line: > type testplot.png Thanks but this did not work, neither. Uwe

Re: [O] babel, matlab export plot to png fails

2017-08-15 Thread Eric S Fraga
On Sunday, 13 Aug 2017 at 08:33, Uwe Brauer wrote: > 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 :results output latex :exports results

Re: [O] babel, matlab export plot to png fails

2017-08-15 Thread Neil Jerram
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];

Re: [O] babel, matlab export plot to png fails

2017-08-13 Thread John Kitchin
You need to get the contents of the png to get output. Maybe the type command will do that. E.g. Add as the last line: type testplot.png On Sun, Aug 13, 2017 at 1:34 AM Uwe Brauer wrote: > > Hi > > I would like to execute some matlab code in org file (using GNU emacs 26 > and

[O] babel, matlab export plot to png fails

2017-08-13 Thread Uwe Brauer
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