here bins were used rather than using raw counts (the default)the vertical axis this is achieved by choosing the here gives the percentage in each classdefined by count total "weightsparameter to be equal to the vector with entries / with length various plotting parameters have also been changed proportion of total age figure histogram of 'agehistograms can also be used for discrete featuresalthough it may be necessary to explicitly specify the bins and placement of the ticks on the axes empirical cumulative distribution function the empirical cumulative distribution functiondenoted by fn is step function which jumps an amount / at observation valueswhere is the number of tied observations at that value for observations xn fn (xis the fraction of observations less than or equal to xi number of xi {xi ( fn (xn = where denotes the indicator functionthat is {xi xis equal to when xi and otherwise to produce plot of the empirical cumulative distribution function we can use the plt step function the result for the age data is shown in figure the empirical cumulative distribution function for discrete quantitative variable is obtained in the same way np sortnutri agey np linspace ( , lennutri age)plt xlabel ('age 'plt ylabel ('fn( )'plt step( ,yplt xlim( min (, max ()plt show (empirical cumulative distribution function indicator