Re: Plot failure: "Visible pixel grid has a scan line longer than previous scan lines"

Dima Kogan <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <[email protected]>
Alright, I debugged this (rr was invaluable), and I know mostly what's
going on. The flow is roughly this:

1. The data is read here:

   https://sourceforge.net/p/gnuplot/gnuplot-main/ci/branch-5-4-stable/tree/src/plot3d.c#l1037

   At the end of the first line, x is 3999.0000000000005, which is just outside the
   xrange [0:3999]. This isn't unexpected due to the "using" expression

2. Later we evaluate the x axis for that point (first row, last col):

   https://sourceforge.net/p/gnuplot/gnuplot-main/ci/branch-5-4-stable/tree/src/axis.c#l2782

   3999.0000000000005>3999, so we set this to OUTRANGE

   In a perfect world we should be looking at the "with image" pixel
   edges instead of just the center; like we do in step 5 below.

3. Later we evaluate the z axis for that same point, but this is already
   OUTRANGE, so we don't bother to use that point to set axis->min or
   axis->max

4. As a result the view_port_z[] range we set later is narrower than it
   should be:

   https://sourceforge.net/p/gnuplot/gnuplot-main/ci/branch-5-4-stable/tree/src/graphics.c#l4822

5. And then, further on in in that function, that corner pixel is deemed
   invisible. So the first row then has only 15 pixels, but the next row
   has all 16, so we complain

The logic in step 5 (what we do for !visible pixels) looks suspicious,
but I want to say the fundamental problem is that step 2 and step 5 have
different logic for inrange/outrange. The top-right corner of the
failing plot is OUT in step 2, but IN in step 5.

Any obvious fixes?

Thanks


_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.