Hi
I'm just emailing with a suggestion for the various plshade routines. I often
have data which is nearly regular in that it is on a regular grid with some
points missing, either because the data doesn't fill the whole domain or
because some data has been flagged as bad. Up to now I'd been padding these
points with MAX_DOUBLE, which takes these regions off scale and they don't get
plotted, except around the edges of the gaps where I get a line with the
maximum value of my colourscale. I just had a case where this was particularly
ugly so have had a look at the plshade code to see if I could see a better way.
A solution I came up with was to flag bad data or gaps with nans by changing
setcond to:
static void
set_cond( register int *cond, register PLFLT *a, register PLINT n )
{
while ( n-- )
{
if ( *a < sh_min )
*cond++ = NEG;
else if ( *a > sh_max )
*cond++ = POS;
else if ( *a != *a ) //check for nans and set cond to
undefined
*cond++ = UNDEF;
else
*cond++ = OK;
a++;
}
}
A comparison of the two methods for my case can be found at
http://homepages.see.leeds.ac.uk/~earpros/plplottest/shade_maxdbl.png
http://homepages.see.leeds.ac.uk/~earpros/plplottest/shade_nan.png
Any thoughts?
Phil------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel