function points_01_plot ( input_file_name ) %% POINTS_01_PLOT plots a set of points that lie in the unit square. % % Discussion: % % The input data is assumed to be a set of points in the unit square. % % The input data is assumed to be stored in an ASCII file named % INPUT_FILE_NAME, with one pair of coordinates per line of text. % % Modified: % % 17 November 2006 % % Author: % % John Burkardt % % Parameters: % % Input, string INPUT_FILE_NAME, the name of the file. % fprintf ( 1, '\n' ); timestamp; fprintf ( 1, '\n' ); fprintf ( 1, 'POINTS_01_PLOT:\n' ); fprintf ( 1, ' Read a set of points in the unit square,\n' ); fprintf ( 1, ' plot them.\n' ); p = load ( input_file_name ); clf axes_handle = axes; % % Make a scatter plot of the points, using filled circles. % handle = scatter ( p(:,1), p(:,2), 'b', 'filled' ); % % Force the plotting region to be square, not rectangular. % axis square % % Request grid lines. % grid on % % Specify the location of the grid lines, and suppress labeling. % set ( axes_handle, 'xtick', [ 0, .25, .50, .75, 1] ); set ( axes_handle, 'xticklabel', [] ); set ( axes_handle, 'ytick', [ 0, .25, .50, .75, 1] ); set ( axes_handle, 'yticklabel', [] ); % % Make the plotting region slightly bigger than the data. % axis ( [ -0.1, 1.1, -0.1, 1.1 ] ) % % Title % title ( input_file_name ); fprintf ( 1, '\n' ); fprintf ( 1, 'POINTS_01_PNG\n' ); fprintf ( 1, ' The input data "%s" was read in, and plotted.\n', ... input_file_name ); fprintf ( 1, '\n' ); timestamp;