NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/plots/resize_legend.m

Revision 495 (checked in by cbc, 12 years ago)

Initial import of Stark code.

Line 
1
2 function  resize_legend (hL, ResizeFact)
3 %RESIZE_LEGEND - Changes LEGEND fontsize and axes position
4 %
5 %Syntax:  resize_legend(hL, ResizeFact);
6 %
7 %Inputs:
8 %  hL           Legend axes handle
9 %  ResizeFact   Factor by which to resize the legend.
10 %               
11 %Example: %Make fontsize and legend axes twice bigger
12 %         hL=legend(......);
13 %         resize_legend(hL,2);
14 %
15 %
16 % Calls: none
17 %Authors: Jim Phillips and Denis Gilbert
18 %Last revision: 20-Mar-2001
19
20 if ~exist('ResizeFact','var'),
21     warning('No resize factor provided')
22     return
23 end
24
25 p = get(hL, 'position');
26 p(3) = p(3)*ResizeFact;
27 p(4) = p(4)*ResizeFact;
28 set(hL,'position', p)
29 ht = findobj( get(hL,'children'), 'type', 'text');
30 set(ht, 'FontSize', get(ht,'FontSize')*ResizeFact)
31 set(gcf,'Resizefcn','')
32 %set(hL,'visible','off')  %
33
34
Note: See TracBrowser for help on using the browser.