Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2018 SR1 b9.5.1.195
Operating System: Windows 8 64-bit
Hi,
Please, would you orient me? I need to plot a ternary contour graphic without normalization, although I choose YES or NO normalize, OriginLab does it (https://www.originlab.com/doc/Origin-Help/Ternary-Contour), I found another similar question https://my.originlab.com/forum/topic.asp?TOPIC_ID=42068 but it is for a ternary diagram and I don´t know how to add the extra column to script.
My data are:
A B C D
0.3 0.5 2.309 2
0.3 0.6 2.392 2
0.4 0.5 1.222 2
0.4 0.6 2.024 2
0.4 0.7 2.093 2
0.5 0.5 0.933 2
0.5 0.6 1.104 2
0.5 0.7 1.325 2
0.5 0.8 1.7 2
0.5 0.9 2.517 2
0.6 0.5 0.714 2
0.6 0.6 0.805 2
0.6 0.7 1.159 2
0.6 0.8 1.727 2
0.6 0.9 2.334 2
0.6 1 1.975 2
0.7 0.5 0.461 2
0.7 0.6 0.931 2
0.7 0.7 1.242 2
0.7 0.8 1.2 2
0.7 0.9 1.51 2
0.7 1 1.812 2
0.7 1.1 2.16 2
0.7 1.2 2.145 2
0.8 0.5 0.415 2
0.8 0.6 0.795 2
0.8 0.7 0.946 2
0.8 0.8 1.03 2
0.8 0.9 1.284 2
0.8 1 1.38 2
0.8 1.1 1.868 2
0.8 1.2 2.041 2
0.8 1.3 2.677 2
0.9 0.5 0.393 2
0.9 0.6 0.454 2
0.9 0.7 0.654 2
0.9 0.9 1.216 2
0.9 1.1 1.457 2
0.9 1.2 2.037 2
0.9 1.3 2.099 2
0.9 1.4 2.522 2
1 0.5 0.355 2
1 0.7 0.625 2
1 0.9 1.09 2
1 1 1.325 2
1 1.2 1.74 2
1 1.3 2.142 2
1 1.4 2.441 2
1 1.5 2.749 2
0.3 0.5 2.92 2.5
0.3 0.6 2.813 2.5
0.4 0.5 1.115 2.5
0.4 0.6 2.068 2.5
0.4 0.7 2.217 2.5
0.5 0.5 1.183 2.5
0.5 0.6 1.359 2.5
0.5 0.7 2.148 2.5
0.5 0.8 2.73 2.5
0.5 0.9 2.62 2.5
0.6 0.5 0.63 2.5
0.6 0.6 0.961 2.5
0.6 0.7 1.284 2.5
0.6 0.8 1.769 2.5
0.6 0.9 1.914 2.5
0.6 1 2.851 2.5
0.7 0.5 0.597 2.5
0.7 0.6 1.507 2.5
0.7 0.7 0.978 2.5
0.7 0.8 1.122 2.5
0.7 0.9 1.56 2.5
0.7 1 1.645 2.5
0.7 1.1 2.268 2.5
0.7 1.2 2.81 2.5
0.8 0.5 0.463 2.5
0.8 0.6 0.718 2.5
0.8 0.7 0.954 2.5
0.8 0.8 1.15 2.5
0.8 0.9 1.3 2.5
0.8 1 1.733 2.5
0.8 1.1 1.682 2.5
0.8 1.2 2.771 2.5
0.8 1.3 2.796 2.5
0.9 0.5 0.439 2.5
0.9 0.6 0.508 2.5
0.9 0.7 0.78 2.5
0.9 0.8 1.009 2.5
0.9 0.9 1.252 2.5
0.9 1 1.29 2.5
0.9 1.1 2.129 2.5
0.9 1.2 2.294 2.5
0.9 1.3 2.108 2.5
0.9 1.4 2.528 2.5
1 0.5 0.338 2.5
1 0.6 0.517 2.5
1 0.7 0.937 2.5
1 0.8 0.909 2.5
1 0.9 0.901 2.5
1 1 1.628 2.5
1 1.1 2.132 2.5
1 1.2 2.242 2.5
1 1.3 2.4 2.5
1 1.4 3.223 2.5
1 1.5 3.297 2.5
0.5 0.9 2.485 3
0.6 0.6 1.049 3
0.6 0.7 1.406 3
0.6 0.8 1.936 3
0.6 0.9 2.397 3
0.6 1 3.414 3
0.7 0.5 0.526 3
0.7 0.6 0.711 3
0.7 0.7 1.137 3
0.7 0.8 1.914 3
0.7 0.9 1.981 3
0.7 1 1.982 3
0.7 1.1 3.05 3
0.7 1.2 2.88 3
0.8 0.5 0.507 3
0.8 0.6 0.777 3
0.8 0.7 0.978 3
0.8 0.8 1.359 3
0.8 0.9 1.573 3
0.8 1 1.901 3
0.8 1.1 2.89 3
0.8 1.2 3.047 3
0.8 1.3 3.833 3
0.9 0.5 0.387 3
0.9 0.6 0.751 3
0.9 0.7 1.017 3
0.9 0.8 1.696 3
0.9 0.9 1.37 3
0.9 1 2.192 3
0.9 1.1 2.143 3
0.9 1.2 3.358 3
0.9 1.3 2.915 3
0.9 1.4 3.553 3
1 0.5 0.639 3
1 0.6 0.68 3
1 0.7 0.718 3
1 0.8 1.07 3
1 0.9 1.334 3
1 1 2.258 3
1 1.1 1.95 3
1 1.2 2.13 3
1 1.3 2.622 3
1 1.4 3.218 3
1 1.5 3.38 3
And I need found every data in the graph, however, it is impossible with a normalized diagram.
Like an exercise I ran the script mentioned before without the D column:
////////////////////////////////////////////////////////////
If(wks.ncols!=3) {type -b Your worksheet should have exactly 3 columns; Return;}
wks.colsel(1,0); wks.colsel(2,0); wks.colsel(3,0); //Clear highlighted columns
max1=max(col(1)); min1=min(col(1));
max2=max(col(2)); min2=min(col(2));
max3=max(col(3)); min3=min(col(3));
Xmin=prec(min1,6); Xmax=prec(max1,6);
Ymin=prec(min2,6); Ymax=prec(max2,6);
Zmin=prec(min3,6); Zmax=prec(max3,6);
gtyp$="Line+Symbol Scatter Line";
igtyp=1;
getN
(Graph Type) igtyp:gtyp$
(X Axis Range) :@G (X From (<$(min1,*3))) Xmin (X To (>$(max1,*3))) Xmax (-) :@G
(Y Axis Range) :@G (Y From (<$(min2,*3))) Ymin (Y To (>$(max2,*3))) Ymax (-) :@G
(Z Axis Range) :@G (Z From (<$(min3,*3))) Zmin (Z To (>$(max3,*3))) Zmax (-) :@G
(General Linear Ternary Plot); //Ask axis ranges
worksheet -a 6; //Add 6 columns
col(4)=(col(1)-Xmin)/(Xmax-Xmin); //Maps X to 0-1 range
col(5)=(col(2)-Ymin)/(Ymax-Ymin); //Maps Y to 0-1 range
col(6)=(col(3)-Zmin)/(Zmax-Zmin); //Maps Z to 0-1 range
col(7)=col(4)/(col(4)+col(5)+col(6)); //Normalize X
col(8)=col(5)/(col(4)+col(5)+col(6)); //Normalize Y
col(9)=col(6)/(col(4)+col(5)+col(6)); //Normalize Z
col(7)[L]$=col(1)[L]$; col(8)[L]$=col(2)[L]$; col(9)[L]$=col(3)[L]$; //Take care Long Names
wks.col7.type=4; //Col(7) as X
wks.col9.type=6; //Col(9) as Z
wks.colsel(9,1); //Highlight Z column
worksheet -P 245 Ternary; //Make a Ternary plot;
if(igtyp==1) layer -i202 %C; //Line+Symbol
else if(igtyp==2) layer -i201 %C; //Scatter
else if(igtyp==3) layer -i200 %C; //Line
//Set formulae for tick labels
String str$, str1$, str2$;
str1$=$(XMax); str2$=$(XMin); str$="x*("+str1$+"-"+str2$+")+"+str2$; layer.x.label.formula$=str$;
str1$=$(YMax); str2$=$(YMin); str$="x*("+str1$+"-"+str2$+")+"+str2$; layer.y2.label.formula$=str$;
str1$=$(ZMax); str2$=$(ZMin); str$="x*("+str1$+"-"+str2$+")+"+str2$; layer.z.label.formula$=str$;
////////////////////////////////////////////////////////////
However, I get a plot that doesn´t show the points related to my data though such as (0.3 0.5 2.309), (0.7 0.9 1.51), etc.
In summary, I need to find the real data in the generated plot.
Thank you for your time and I would be grateful for any suggestions.
Cheers!
-Edwin