Here's what I think should happen. Reality may differ.
First, some basic review of expectations.
Field P1 has "data"(1), "positions"(1), "invalid positions"(1)
Field P2 has "data"(2), "positions"(2), "invalid positions"(2)
You Replace "data"(1) into P2 as "positions" yielding:
Field P3 with "data"(2), "positions"(data1), "invalid positions"(2)
Plot sees only "invalid positions"(2) as invalid. Therefore the points that
are not plotted correspond to those that were invalid in P2 originally.
Note that Replace only carries over the named component (it does not drag
along the "invalid positions" for free). Note also that "invalid positions"
knows or cares nothing about "data": it only masks off designated positions
by their index. If you slipped in some different numbers behind its back
(as we did above), it doesn't know or care about that either. Still masks
the same positions by index. (I don't mean by ref, but because our invalids
are position-dep, they are implicitly associated in linear order with the
corresponding list of positions.)
That's not what you wanted, so let's go to Experiment 2.
Extract(P1, "invalid positions"(1)) and Extract(P2, "invalid positions(2)")
(this could be done with Marks and Unmarks as well)
Next, we combine the invalids in Compute:
byte("invalid positions"(1)) || byte("invalid positions"(2))
which yields an array we'll call "invalid positions"(1or2).
Replace "invalid positions"(1or2) into P2 as "invalid positions" to yield:
Field P3 with "data"(2), "positions"(2), "invalid positions"(1or2)
Now, Replace "data"(1) into P3 as "positions" to yield:
Field P4 with "data"(2), "positions"(data1), "invalid positions"(1or2)
Then you Plot P4.
My simple tests all work as expected. Any point for which there is an
invalid entry in "invalid positions"(1or2) does not appear in the Plot.
BTW, normally I steer clear of Plot cause it makes my head hurt. I'd
probably do it like this:
Do the same thing with combining and replacing the "invalid
positions"(1or2) to make Field P3.
Then, feed P3 and P1 to Compute: ["data"(2), "data"(1)]
Unmark("positions")
This yields:
Field P4 with "data"(2), "positions"([data1,data2]), "invalid positions"(1or2)
then Glyph to get "data"(2) glyphs plotted in [data2, data1] space. Turn on
AutoAxes if you want to see numbers on the axes. By feeding Compute P3 on
the left, P4 inherits the structure of P3 including the "invalid
positions"(1or2).
This is obviously extensible to 3D unlike Plot.
Chris Pelkie
Vice President/Scientific Visualization Producer
Conceptual Reality Presentations, Inc.
30 West Meadow Drive
Ithaca, NY 14850
[EMAIL PROTECTED]