Fltk toolkit, grid is shown *beneath* pcolor (2D density plot)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Fltk toolkit, grid is shown *beneath* pcolor (2D density plot)

Rose Merry
Hello!

Octave version 4.0.3 (Debian Stretch; sorry, didn't check latest version).

x=linspace(-1.1,1.1,100);
y=linspace(-1.1,1.1,100);
[xx,yy]=meshgrid(x,y);
zz=sinc(sqrt(xx.^2+yy.^2));
pcolor(xx,yy,zz);
shading('interp')
grid on

Result -- grid is shown *beneath* pcolor, so pretty useless:
http://img12.lostpic.net/2018/02/08/c16462508e969acf488fc0d463c87aaa.png

I tried to put grid immediately after pcolor -- not working either. With gnuplot works fine.

Thanks.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Fltk toolkit, grid is shown *beneath* pcolor (2D density plot)

Pantxo
Rose Merry wrote

> Hello!
>
> Octave version 4.0.3 (Debian Stretch; sorry, didn't check latest version).
>
> x=linspace(-1.1,1.1,100);
> y=linspace(-1.1,1.1,100);
> [xx,yy]=meshgrid(x,y);
> zz=sinc(sqrt(xx.^2+yy.^2));
> pcolor(xx,yy,zz);
> shading('interp')
> grid on
>
> Result -- grid is shown *beneath* pcolor, so pretty useless:
> http://img12.lostpic.net/2018/02/08/c16462508e969acf488fc0d463c87aaa.png
>
> I tried to put grid immediately after pcolor -- not working either. With
> gnuplot works fine.
>
> Thanks.
>
> -----------------------------------------
> Join us March 12-15 at CERN near Geneva
> Switzerland for OctConf 2018.  More info:
> https://wiki.octave.org/OctConf_2018
> -----------------------------------------

It is the "layer" property of the axes that controls wether the gris and
axes lines are shown above or bellow children primitives
(https://www.gnu.org/software/octave/doc/interpreter/Axes-Properties.html):

set (gca, "layer", "top")

Pantxo



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


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re[2]: Fltk toolkit, grid is shown *beneath* pcolor (2D density plot)

Rose Merry
>It is the "layer" property of the axes that controls wether the gris and
>axes lines are shown above or bellow children primitives
>( https://www.gnu.org/software/octave/doc/interpreter/Axes-Properties.html ):
>
>set (gca, "layer", "top")

Works! Thank you so much! I couldn't find this solution myself :( Solved.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Fltk toolkit: how to force *non*-anti-aliased operation

Rose Merry
In reply to this post by Pantxo
Hello!

Octave version 4.0.3 (Debian Stretch; sorry, didn't check latest version).

I do not want modern and beautiful anti-aliasing (AA). How to force all graphics to be non-anti-aliased?

Text can be made non-AA *in gnuplot* using:
set(0,'defaultaxesfontname','terminus');
set(0,'defaultaxesfontsize',12);
set(0,'defaulttextfontname','terminus');
set(0,'defaulttextfontsize',12);
plot(1:N);
title(['wfevew']);

But when I do it in fltk, I get garbage (tried several sizes, that do work for gnuplot):
http://img12.lostpic.net/2018/02/10/f059025c75419074cb77ebe4cce4c6e7.png

Also, the blue line is AA-ed.

Gnuplot works fine -- fully non-AA-ed: text and the blue plot line:
http://img12.lostpic.net/2018/02/10/019157999eb528d14b99c42b11b2b4dc.png

Thanks.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Fltk toolkit: how to force *non*-anti-aliased operation

Rose Merry
I minor correction: with those "set" commands -- font can be changed in gnuplot. By default everything is already non-anti-aliased in gnuplot, out of the box.

My question remains the same -- how to make fltk non-AA-ed.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re[2]: Fltk toolkit: how to force *non*-anti-aliased operation

Evgeni F

Oh, I didn't know this "reply" system is smart enough to attach this new topic to the old one. Please ignore these posts here. I'll create a brand new topic.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re[3]: Fltk toolkit: how to force *non*-anti-aliased operation

Rose Merry
Oh, I didn't know this "reply" system is smart enough to attach this new topic to the old one. My apologies. Please ignore these posts here. I created a brand new topic.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------