Stereographic Diagrams
Stereographic Diagrams
(OP)
Hi,
Has anyone managed to plot a stereographic triangle with EXCEL.
I look forward to all your tips.
Regards
Barry
Has anyone managed to plot a stereographic triangle with EXCEL.
I look forward to all your tips.
Regards
Barry





RE: Stereographic Diagrams
There is a triangle plot of a solubility as a function of three variables though not really independent while the sum of them must be 1,0 (after a normalization) in a software package Statistica that I am using too. Maybe that would help you.
m777182
RE: Stereographic Diagrams
Do you mean the triangle graphics perhaps, like those oriented to analyze phases & concentrations, etc, or flammability problems?
If so, maybe this clarifies your post.
I'm in the same search. If I succeed with matlab or excel, I'll post here.
Have a safe day
J.Alvarez
RE: Stereographic Diagrams
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Stereographic Diagrams
Just what I was looking for.
I've a problem with the macro; clicking on "Draw" it appears a compilation error message about the Byref, in the subroutine:
Sub DrawCurve(XYValues As Variant)
I will see if I can do something. Maybe is related with my units definition.
Thanks
J.Alvarez
RE: Stereographic Diagrams
Your spreadsheet worked, changing the definition double by Variant at the end of the module. See changes in bold:
...
...
Function TernaryToXY(x_A As Variant, x_B As Variant) As Variant
Dim TXY(1) As Double
TXY(0) = LLX + SideSize * (1 - x_A + x_B) / 2
TXY(1) = LLY - SideSize * HSratio * (1 - x_A - x_B)
TernaryToXY = TXY
End Function
I will try to improve the graph, it seems not to work correctly changing the values. Suggestions?
Regards
J.Alvarez
RE: Stereographic Diagrams
The bug apart (I know it is there simply coz you forgot to do a test-run before posting and inadvertently sent this version), your program is simply beautiful!
A fine example of graphics automation in Excel - my compliments!
DARE TO IMAGINE
mala_rs_singh@rediffmail.com
RE: Stereographic Diagrams
Jalvarez,
Although your suggestion works, I decided to change the function header to:
Function TernaryToXY(ByVal x_A As Double, ByVal x_B As Double) As Variant
I don't know what the problem with the values would be, can you be more specific?
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Stereographic Diagrams
'Dim X1 As Double, Y1 As Double, X2 As Double, Y2 As Double'
now look at the values as passed to the subroutine:
XY = TernaryToXY(XYValues(i, 0), XYValues(i, 1))
where:
'Function TernaryToXY(x_A, x_B) As Variant'
which makes XY a variant..
Now deriving two 'double' values from a variant as follows:
X1 = XY(0)
Y1 = XY(1)
appears to be a possible cause of the error...
Bottom line is (the way I look at it) : What works OK is the correct syntax...
Mala Singh
'Dare to Imagine'
RE: Stereographic Diagrams
The trouble with the numbers is related to the figures that appears in the Excel table.
The last six rows are not possible values, but they demonstrate that they cannot be drawn. Bright!
These rows are available for any additional data, if available, right? Good job...
I added a colored background, and it's fine.
Your spreadsheet dissapeared on the addressing, so it's lost for future interested guys.
Mala, I'll review your comments, thanks.
Have a safe day
J.Alvarez
RE: Stereographic Diagrams
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.