Page 1 of 1

Ternary phase diagram problem

Posted: Wed Oct 15, 2008 3:47 am
by TKoltai
Dear users, administrators,

I'm a new user, maybe the problem is not in the program but in the user...

I started to work with ternary phase diagram.
I enter series of points into the ternary diagram and I want to present the points together with their linear fit curve (equation) on the same graph.

An example:
I enter the following points:
X Y
16.40518263; 74.76125749
16.929289; 77.84124
18.30867741; 81.54367
It works without error message, it gives y=19.79+3.384y linear fitting curve.
However when I enter the following points that I intend to present on the same graph:

X Y
29.86582804; 54.05257225
30.772368; 59.72203
32.71372135; 67.02246

I receive the following error message:
"Point 993 of curve 2 has X+Y=100.00242. All X and Y values for a triangle plot must have a sum less than or equal to 100."

Question:
When I look the entered XY points their sum is never passed the 100. Also the error message refers to curve 2 which is in my case the calculated linear fitting curve which theoretically can not pass neither the 100.
Can you let me know what the problem is and how to solve it?
Thanks,

Posted: Wed Oct 15, 2008 10:43 am
by DPlotAdmin
The error message is correct, just delayed longer than it should have been. Leaving off the 2nd set of 3 points, you'll get the same error message if you switch to some other scale (e.g. linear x, linear y) and back to a triangle plot.
When I look the entered XY points their sum is never passed the 100.
That's correct (or you'd never have been able to select "Triangle plot" for your initial 3 points)
Also the error message refers to curve 2 which is in my case the calculated linear fitting curve which theoretically can not pass neither the 100.
But this is unfortunately incorrect. DPlot's curve fitting routine does not care that you have a triangle plot; it is just finding the best fit to those 3 data points. Points 993-1000 in the fit all violate X+Y<100.
Can you let me know what the problem is and how to solve it?
I'll look into modifying the curve fit routine to add a constraint for X+Y<100 when a triangle plot is used. This is a bit more trouble than it might sound like because the curve fit routine is directly solving for the least squares solution, with no facility for adding constraints. But I'll definitely look into it.

For now (if you want to keep that curve fit) the best you can do is use Edit>Edit Data to delete points 993-1000 in the fit.

Posted: Thu Oct 16, 2008 4:18 am
by TKoltai
Thank you,
It works what you proposed, and anyway what is important for me is the equation, which is not affected by this change.