source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/graphics/mobile_text.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 515 bytes
Line 
1function h = mobile_text(varargin)
2% MOBILE_TEXT('str1', 'str2', ...) places each string in a random position
3% on the current axes.  The strings can be dragged around with the mouse.
4% Returns handles to the text objects, for setting colors, etc.
5
6strs = varargin;
7n = length(strs);
8ax = axis;
9% random placement
10x = rand(1,n)*(ax(2)-ax(1)) + ax(1);
11y = rand(1,n)*(ax(4)-ax(3)) + ax(3);
12h = [];
13for i = 1:n
14  h = [h text(x(i),y(i),strs{i})];
15end
16set(h,'ButtonDownFcn','move_obj(1)');
17if nargout == 0
18  clear h
19end
Note: See TracBrowser for help on using the repository browser.