| When you are using this animation technique with larger data sets, in order to achieve maximum speed you can turn off double buffering for the figure, as follows: set(gcf,'doubleBuffer' ,'off) Adding Text to Images You can use basic array indexing to rasterize text strings into an existing image, as follows: Draw the text strings using text, and then capture a bitmapped version of them using getframe. Then find the black pixels and convert their subscripts to indexes using sub2ind. Use these subscripts to "paint" the text into the image into which you want to add the text string, then save that image. Here isanexampleusingtheimageinthedemoMAT-filemandrill.mat: % Create the text in an axis: t = text(.05,.1,'Mandrm Face', ... 'FontSize',12, 'FontWeight','demi'); % Capture the text from the screen: F = getframe(gca,[10 10 200 200]); % Close the figure: close % Select any plane of the resulting RGB image: c = F.cdata(:,:,1); % Note: If you have Image Processing Toolbox installed, % you can convert the RGB data from the frame to black or white: % c = rgb2ind(F.cdata,2); % Determine where the text was (black is 0): |