Ok, well that figured out the “One Contour” problem.
I have attached a script that demonstrates that LIST isn’t returning the contour levels in the same order as they were passed in. The plots might need some explanation, I’ll do my best.
-
I have drawn the actual graphs returned by LIST. Each contour level gets its own pad.
-
The contour level increases from left to right i.e. left most pad = contour #1, and then to the right contour #2 etc.
-
Negative contours should produce two loops in the top left and bottom right quadrants. Positive contours should produce the opposite.
It helps to run this script under 3 cases, each time adding one contour. Modify argument 1 of SetContour() on line 68 to do this.
When I run this script with 2 contours (both negative), I get the correct output. The first contour is smaller that the less negtive 2nd contour as expected. Also, it’s important to note the # of points on each graph. The smaller contours should have fewer points. We see:
z = -0.4 has 2 graphs of 107pts
z = -0.2 has 2 graphs of 133pts
running the script again but adding a 3rd (Positive) contour level, we see that the # of points changes. Now:
z = -0.4 has 2 graphs of 133pts
z = -0.2 has 2 graphs of 133pts
z = 0.2 has 2 graphs of 107pts
Also, the plots have changed. We now see cont[0] is a positive large ring, cont[1] is a negtive large ring, and cont[2] is a negative small ring. This shows that the bottom and top contours have flipped order when returned by LIST. Or:
ContIN[0] --> ContOUT[2]
ContIN[1] --> ContOUT[1]
ContIN[2] --> ContOUT[0]
running the script again with 4 contours (2 neg, 2 pos), we see the same misordering. The plots show: Large Pos, Large Neg, Small Neg, Small Pos. We can also see this in the # of points per contour.
z = -0.4 has 2 graphs of 133pts
z = -0.2 has 2 graphs of 133pts
z = 0.2 has 2 graphs of 107pts
z = 0.4 has 2 graphs of 107pts
Because the histogram2D is symmetric, we expect Z = +/- 0.2 to have the same # of points. Also, Z = 0.4 should not have the same # of points as the larger Z = 0.2
Sorry about the lengthy post. Let me know if my description makes sense to you.
Thanks,
Josh
ContListOrder.C (4.2 KB)