Thu 27 Mar 2014 07:32:19 AM UTC, comment #13:
Bug # 41957 may also be relevant
|
Thu 27 Mar 2014 06:49:42 AM UTC, comment #12:
Closing this duplicate of bug #33180.
|
Fri 17 Jan 2014 04:57:56 PM UTC, comment #11:
I think you can get what you want by using a project-specific .octaverc file. In the directory where you are doing your work, make a new file ".octaverc" and put whatever commands you want in it. In this case, put the command
You can read about it in the documentation, but Octave runs the global .octaverc file, the personal .octaverc file (~/.octaverc), and then the project-specific .octaverc file so these local changes will override your more general settings.
The other solution is to make the figures visible before printing.
|
Fri 17 Jan 2014 08:03:42 AM UTC, comment #10:
OK, thank you very much.
Then, suppose I have to run several instances of
inside a Makefile, I have to put a
on top of each file?.m, I don't see an option to directly start octave with gnuplot.
Marco
|
Thu 16 Jan 2014 04:44:20 PM UTC, comment #9:
Good debugging. Unfortunately you've traced it down to a known problem. There is no off-screen printing for FLTK. The figure window needs to be visible for gl2ps to function. See bug #33180. It also bites us when producing the documentation, which some people want to do on headless build machines, so we're forced into using gnuplot for the pictures in the manual. It's very uncertain when this will get fixed.
|
Thu 16 Jan 2014 09:41:29 AM UTC, comment #8:
Hi,
it seems now I have an example always failing, with or without sleep(1)
If I remove the line set(f,'visible','off'), then (today) it always works. With the line, it works with gnuplot.
Marco
|
Wed 15 Jan 2014 06:48:57 PM UTC, comment #7:
The drawnow function is written in C++ and it uses the gl2ps library to take the plot (OpenGL) and convert it to Postscript. It then seems to pass the resulting data on to whatever the pipeline command is via a call to system().
I would put a
statement just above the call to drawnow() in _fltk_print_.m. That will drop you into the debugger and you can inspect the pipeline command to see if it looks appropriate.
I know one difference is that most output formats have a single gl2ps device and a single pipeline command. The 'standalone' output formats, instead, run OpenGL two times and with possibly two different pipeline commands.
|
Wed 15 Jan 2014 08:08:18 AM UTC, comment #6:
Hi Rik,
today it is always working, with or without the sleep(1) command.
Is there an easy way to know what the command
is really doing? Calling ghostscript, epstool, ...?
Thanks,
Marco
|
Tue 14 Jan 2014 07:04:08 PM UTC, comment #5:
Well there is something interesting going on. I ran
and it always passes. Whatever it is doesn't seem to affect my machine.
What happens if you put the sleep(1) command just before line 651 of print.m so it reads
|
Tue 14 Jan 2014 02:21:48 PM UTC, comment #4:
sleep(1) does not solve the intermittent result. But, even without sleep(1), the following
rm -rf test.tex test-inc.eps && octave
that is the two commands on the same line always works (well, 10 consecutive times, never happened before).
Marco
|
Tue 14 Jan 2014 01:19:56 PM UTC, comment #3:
Take a look at the file private/__fltk_print__.m at the bottom near line 170. There is the following:
The intermittent failure seems to point to a race condition. The drawnow call actually uses gl2ps to create the output and then pipes it through a command that might include ghostscript or epstool.
To confirm that it is a race condition you might want to add a 'sleep (1)' call just before opts.latex_standalone (opts). If that works repeatedly then we can sort out a better solution.
|
Tue 14 Jan 2014 07:59:38 AM UTC, comment #2:
With the option -f, it sometimes works, in a quite random way.
Maybe it randomly works without that option, too.
When it does not work, it is because at l.651 of print.m the output file is supposed to exist. I cannot find where the output file is created before to be opened for reading.
Marco
|
Mon 13 Jan 2014 04:48:52 PM UTC, comment #1:
Might be something odd with your setup as this works for me with 3.8.0. I'm running Kubuntu12.04.
I ran
I used the '-f' switch to avoid loading any Octave configuration files that might be changing settings.
|
Mon 13 Jan 2014 10:39:25 AM UTC, original submission:
Dear all,
the following
gives me
while working with 3.6.2.
Cheers,
Marco
|