% % Example epage: 28 % % Written by: % -- % John L. Weatherwax 2008-02-20 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- clear all; close all; drawnow; clc; addpath('../../Code/eda_toolbox'); addpath('../../Code/eda_data'); load software % First transform the data. X = log(prepsloc); Y = log(defsloc); % Plot the transformed data. plot(X,Y,'.'); grid on; xlabel('Log PrepTime/SLOC') ylabel('Log Defects/SLOC') title( sprintf('the original software data') ); saveas( gcf, '../../WriteUp/Graphics/Chapter1/prob_1_11_orig_data', 'eps' ); % try the other transformations: % X = prepsloc; Y = log( 1 + sqrt(X) ); figure; ph1=plot(X,Y,'.k'); grid on; hold on; Y = log( sqrt(X) ); ph2=plot(X,Y,'.r'); legend( [ph1,ph2], {'log(1+sqrt(x))', 'log(sqrt(x))'}, 'location', 'southeast' ); xlabel('PrepsLoc') ylabel('T(PrepsLoc)'); title( sprintf('the transformed software data') ); saveas( gcf, '../../WriteUp/Graphics/Chapter1/prob_1_11_transformed', 'eps' );