-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformatFigure.m
63 lines (53 loc) · 1.63 KB
/
formatFigure.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
function varargout = formatFigure(varargin)
% FORMATFIGURE da el formato a las figuras
if nargin > 0
figureA = varargin{1};
else
figureA = gcf;
end
% Seteo el tamano de la figura y la posicion en la pantalla
set(figureA,...
'Units', 'in',...
'PaperSize',[5 5],...
'Resize', 'off',... 'Color', 'none',...
'Position', [1 1 5 5])
% obtengo los ejes del grafico
ax = get(figureA,'Children');
hTitle = ax.Title;
hXLabel = ax.XLabel;
hYLabel = ax.YLabel;
hZLabel = ax.ZLabel;
hLegend = legend(ax);
set([hTitle, hXLabel, hYLabel, hZLabel], ...
'FontName' , 'AvantGarde');
set([hLegend, ax ] , ...
'FontSize' , 10 );
set([hXLabel, hYLabel, hZLabel] , ...
'FontSize' , 12 , ...
'FontWeight' , 'normal');
set( hTitle , ...
'FontSize' , 12 , ...
'FontWeight' , 'bold' );
set(ax, ...
'PlotBoxAspectRatio' , [1 1 1],... 'DataAspectRatio' , [1 1 1],...
'Box' , 'on' , ...
'TickDir' , 'out' , ...
'TickLength' , [.02 .02] , ...
'LineWidth' , 1 , ...
'FontWeight' , 'normal' ,...
'FontName' , 'Helvetica' ,...
'FontSize' , 12 ,... %%poner parentesis aca para polarplot
'XMinorTick' , 'on' , ...
'YMinorTick' , 'on' , ...
'ZMinorTick' , 'on' , ...
'XGrid' , 'on' , ...
'YGrid' , 'on' , ...
'ZGrid' , 'on' , ...
'XColor' , 3*[.1 .1 .1], ...
'YColor' , 3*[.1 .1 .1],...
'ZColor' , 3*[.1 .1 .1]);
% Para dejar que los
% axis([1.05*axis)
if nargout > 0
varargout{1} = figureA;
end