Hi,
Guys. It seems that I could not print figure using 'print' function with fltk.
Here is my code:
graphics_toolkit
x = -pi:pi/100:pi;
y = sin(x);
f = figure('visible', 'off');
plot(x, y)
print(f, 'sin.png', '-dpng');
Outputs:
ans = fltk
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 385 column 9
print at line 315 column 8
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 388 column 9
print at line 315 column 8
warning: print.m: pstoedit binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 391 column 9
print at line 315 column 8
error: __osmesa_print__: Depth and stencil doesn't match, are you sure you are using OSMesa >= 9.0?
error: called from
__opengl_print__ at line 172 column 7
print at line 519 column 14
And I did not get the file "sin.png" in the current directory.
I switched to gnuplot with "graphics_toolkit('gnuplot')", and it works well. Then I add
graphics_toolkit('gnuplot')
to my .octaverc, which is ~/.octaverc, and I run graphics_toolkit to confirm that gnuplot is used,
but still failed to use print function.
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 385 column 9
print at line 315 column 8
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 388 column 9
print at line 315 column 8
warning: print.m: pstoedit binary is not available.
Some output formats are not available.
warning: called from
__print_parse_opts__ at line 391 column 9
print at line 315 column 8
It's weird, I have to run "graphics_toolkit('gnuplot')" in octave to get it work. Any suggestions?
OS: Arch Linux
octave 4.2.1
gnuplot 5.2 patchlevel 0
Since epstool is not available from Arch Linux official repo, I might prefer gnuplot over fltk.