The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Ternary diagram WITHOUT normalization

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Sabin1989 Posted - 04/12/2018 : 11:54:55 AM
Origin Ver. and Service Release (Select Help-->About Origin): Pro 2018 SR1 b9.5.1.195
Operating System: Windows 7 64-bit

Hi!
I need to plot data in a ternary diagram WITHOUT any normalization.
Judging by the online help info, this is not straightforward with Origin for reasons I fail to understand.
I would be grateful for any suggestions on how to deal with this.
Cheers!
4   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 05/03/2018 : 3:42:15 PM
Hi Sabin,

Greg is right - The idea of the Ternary plot is to show the ratio of 3 components;
But, this doesn't mean you cannot "map" the ratio to the other linear scale.
That is:
X:  0 <=x <=1,  Y: 0<=y<=1,    Z: 0<=z<=1 , and 
X': x1<=x'<=x2, Y':y1<=y'<=y2, Z':z1<=z'<=z2
then, x'=x1+x*(x2-x1), etc.
You can do this mapping manually, but you can also run the following script (from
XYZ 3-column worksheet):
////////////////////////////////////////////////////////////
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$;
////////////////////////////////////////////////////////////

When you run this script, it asks you to enter the plot type, and the axis ranges.



After mapping the data, the axis tick labels are also mapped by the above formulae.




Hope this helps.

--Hideo Fujii
OriginLab
greg Posted - 04/30/2018 : 5:55:25 PM
By definition, a ternary plot represents the fraction of a whole (0 to 1) or percent (0 to 100) of each of three variables. Therefore, every row should add up to 1 or 100. If this is the case, Origin just plots. In all other cases, Origin will normalize the data and plot or leave the data alone and plot a normalized version of the data.

There is no hope!
(But I may be wrong.)
Sabin1989 Posted - 04/13/2018 : 07:21:06 AM
Dear Aviel,

Many thanks for your reply!
I did select "No", but my data was still normalized.

Also, in the online help, it is stated that:
"And if you choose “No”, Origin will also normalize the input data and then plot, but the original data in the worksheet will not be changed."

To me, this makes it sound like it's not possible to plot without some normalization, and I don't understand why that should be the case.
arstern Posted - 04/12/2018 : 12:35:03 PM
Hi,

Please see the notes section in Origin Help: https://www.originlab.com/doc/Origin-Help/Ternary-Graph

If your data does not normalize, Origin will provide a pop-up window asking you if you want Origin to Normalize or not normalize your data. Select No to plot the ternary diagram without normalization.

The pop-up window should look like this:



Thanks,
OriginLab
Aviel

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000