forked from alchemyst/ternplot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathternlabel.m
More file actions
24 lines (18 loc) · 732 Bytes
/
ternlabel.m
File metadata and controls
24 lines (18 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% TERNLABEL label ternary phase diagram
% TERNLABEL('ALABEL', 'BLABEL', 'CLABEL') labels a ternary phase diagram created using TERNPLOT
%
% H = TERNLABEL('ALABEL', 'BLABEL', 'CLABEL') returns handles to the text objects created.
% with the labels provided. TeX escape codes are accepted.
%
% See also TERNPLOT
% Author: Carl Sandrock 20020827
% To Do
% Modifications
% Modifiers
function h = ternlabel(A, B, C)
r(1) = text(0.5, -0.05, A, 'horizontalalignment', 'center');
r(2) = text(1-0.45*sin(deg2rad(30)), 0.5, B, 'rotation', -60, 'horizontalalignment', 'center');
r(3) = text(0.45*sin(deg2rad(30)), 0.5, C, 'rotation', 60, 'horizontalalignment', 'center');
if nargout > 0
h = r;
end;