|
From: Petr M. <mi...@ph...> - 2006-08-25 07:15:29
|
> if (j == DF_UNDEFINED || j == DF_MISSING) {
> cp->type = UNDEFINED;
> continue;
> }
>
> It seems clear to me that at least for gridded surfaces the
> "continue" statement should be replaced by a jump to
> come_here_if_undefined. That does, in fact, fix the specific
> problem reported on the newsgroup.
>
> However, I am dubious about the affect this has on PM3D output.
> I tried replacing one of the data points in triangle.dat with a
> nonsense string, or with NaN, and issuing the commands
>
> splot 'triangle.dat' using 1:2:3 with pm3d
> splot 'triangle.dat' using ($1):($2):($3) with pm3d
>
> The results are odd, to say the least.
>
> What is supposed to happen if pm3d sees an invalid point?
You mean handling of points marked as UNDEFINED in routine pm3d_plot().
If any of the 4 corners to be drawn as a color quadrangle is undefined, then
its drawing is skipped. It is the "continue" in the last occurence of
"UNDEFINED" string in pm3d.c.
In pm3d.c, if you uncomment these blocks:
/* debugging: print scan_array */
/* debugging: this loop prints properties of all scans */
then all the scans&points gnuplot passes into the pm3d draw routine will be
printed.
I see that in both cases of a NaN-changed triangle.dat:
splot 'triangle.dat' using 1:2:3 with pm3d
splot 'triangle.dat' using ($1):($2):($3) with pm3d
no undefined point comes into pm3d_plot() -- thus, they are missing. Then
the scan with a NaN is 1 point shorter and thus qudrangles instead of
rectangles for a grid topology are drawn behind that.
With your patch of plot3d.c, all scans have the number of points as
intended. The rectangle(s) contaning a point with NaN are not drawn. This
looks like to be what is expected, so I propose you commit the plot3d.c
patch.
---
PM
|