Could not print figure with fltk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Could not print figure with fltk

hottea
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.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Could not print figure with fltk

Pantxo
hottea wrote

> 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
> ...
>
> _______________________________________________
> Help-octave mailing list

> Help-octave@

> https://lists.gnu.org/mailman/listinfo/help-octave

Hi,

The warnings you are seeing are not relevant for png format (install
transfig and they will disappear).

The error :
>>error: __osmesa_print__: Depth and stencil doesn't match, are you sure you
are using OSMesa >= 9.0?

is the same as I obtain on ubuntu 14.04 (more precisely mint 17.3) due to
this upstream bug:

https://bugs.launchpad.net/bugs/1424059

Maybe you are facing the same kind of miscompiled osmesa on arch.

Pantxo




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Could not print figure with fltk

Dmitri A. Sergatskov
In reply to this post by hottea


On Mon, Sep 18, 2017 at 5:34 AM, hottea <[hidden email]> wrote:

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


​This is the real problem. Most likely you got hit by this bug:


Dmitri.
--


 

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Could not print figure with fltk

Andreas Weber-6
In reply to this post by hottea
Am 18.09.2017 um 12:34 schrieb hottea:
> OS: Arch Linux
> ...
> Since epstool is not available from Arch Linux official repo, I might
> prefer gnuplot over fltk.

http://wiki.octave.org/Octave_for_Arch_Linux

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave