-
Notifications
You must be signed in to change notification settings - Fork 182
/
quiver.m
69 lines (53 loc) · 1.52 KB
/
quiver.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
function varargout = quiver(ori,varargin)
% annotate a orientation to an existing plot
%
% Syntax
% quiver(ori)
% quiver(ori,'label','o1')
% quiver(ori,'MarkerFaceColor','blue')
% quiver(ori,'filled')
%
% Input
% ori - @orientation
%
% Options
% MarkerFaceColor -
% MarkerEdgeColor -
% MarkerSize -
% label -
%
% Flags
% filled -
% labeled -
%
% See also
% orientation/scatter orientation/plotPDF orientation/plotODF
% orientation/plotIPDF vector3d/text
[mtexFig,isNew] = newMtexFigure(varargin{:});
if isNew || isappdata(mtexFig.gca,'orientationPlot')
[varargout{1:nargout}] = scatter(ori,varargin{:});
return;
elseif isappdata(mtexFig.parent,'ODFSections')
oS = getappdata(mtexFig.parent,'ODFSections');
[varargout{1:nargout}] = oS.plot(ori,varargin{:});
return
end
if check_option(varargin,'add2all')
allAxes = mtexFig.children;
else
allAxes = get_option(varargin,'parent',mtexFig.currentAxes);
end
varargin = delete_option(varargin,{'add2all','parent'},[0,1]);
% plotting
for ax = allAxes(:).'
switch get(ax,'tag')
case 'pdf' % pole figure annotations
[varargout{1:nargout}] = plotPDF(ori,varargin{:},'parent',ax,'noTitle');
case 'ipdf' % inverse pole figure annotations
[varargout{1:nargout}] = plotIPDF(ori,varargin{:},'parent',ax,'noTitle');
case 'odf' % ODF sections plot
[varargout{1:nargout}] = plotSection(ori,varargin{:},'parent',ax);
otherwise
[varargout{1:nargout}] = scatter(ori,varargin{:},'parent',ax);
end
end