octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58956] Empty plot for certain xlim / ylim set


From: Hg200
Subject: [Octave-bug-tracker] [bug #58956] Empty plot for certain xlim / ylim settings
Date: Sun, 16 Aug 2020 13:03:37 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #3, bug #58956 (project octave):

Okay, then i think it's a bug related to plotting, because in a numerical tool
like Octave one can't expect axis limits to always be less than the order of
+-3e5.

1.) If we switch to 

++
graphics_toolkit ('gnuplot')
--

everything is displayed correctly. If we switch to fltk, similar problem
occurs:

++
graphics_toolkit ('fltk')
--

2.) When we compare the output of 

++
get (gca)
--

between Octave and Matlab R2018, the camera position and some other properties
differ. It looks like Octave rather correlates with Matlab R2013 than R2018.
Anyway, I believe there's basically nothing wrong with it, although the camera
position has an influence on the bug.

3.) I've searched via trial and error. For example in
opengl_renderer::setup_opengl_transformation, the near and far values
​​for the example from comment 0 are at the clipping edge:

++
xZ1 = std::max (-1e6, x_zlim(0)-(x_zlim(1)-x_zlim(0))*100.0);
xZ2 = std::min (1e6, x_zlim(1)+(x_zlim(1)-x_zlim(0))*100.0);
m_glfcns.glOrtho (0, vp(2), vp(3), 0, xZ1, xZ2);
(gdb) print *vp.rep.data@vp.rep.len
$1 = {0, 0, 560, 420}
(gdb) print *x_zlim.rep.data@x_zlim.rep.len
$2 = {1118033.4887610751, 1118034.4887610751}
(gdb) print xZ1
$4 = 1117933.4887610751
(gdb) print xZ2
$3 = 1000000
--

glOrtho produces a parallel projection. If we allow a wider near/far interval
it seems to solve the problem, although it does not solve the problem for all
variations of larger axis (i.e. 1e12). This and also
axes::properties::update_camera look like a starting point to me.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58956>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]