urlprefix 'https :/vincentarelbundock github iordatasets /csv/dataname 'massbirthwt csv bwt pd read_csv urlprefix dataname bwt bwt drop('unnamed , #drop unnamed column styles { [' ','red '] ['^','blue ']for in styles grp bwt[bwt smoke ==km, np polyfit (grp age grp bwt fit straight line plt scatter (grp age grp bwt cstyles [ ][ = linewidth = marker styles [ ][ ]plt plot(grp age *grp age '-'color styles [ ][ ]plt xlabel ('age 'plt ylabel ('birth weight ( )'plt legend (['non smokers ','smokers '],prop ={'size ': loc =( , plt show ( non-smokers smokers birth weight ( age figure birth weight against age for smoking and non-smoking mothers plots for one qualitative and one quantitative variable in this settingit is interesting to draw boxplots of the quantitative feature for each level of the categorical feature assuming the variables are structured correctlythe function plt boxplot can be used to produce figure using the following codemales nutri nutri gender ='male 'females nutri nutri gender ='female 'plt boxplot (males coffee females coffee ]notch =true widths =( , plt xlabel ('gender 'plt ylabel ('coffee 'plt xticks ([ , ,'male ','female ']plt show (