the figure was made using the seaborn packagewhich was specifically designed to simplify statistical visualization tasks import seaborn as sns sns countplot ( ='situation 'hue 'gender 'data=nutri hue_order ['male ''female ']palette ['skyblue ','pink ']saturation edgecolor ='black 'plt legend (loc='upper center 'plt xlabel (''plt ylabel ('counts 'plt show ( plots for two quantitative variables we can visualize patterns between two quantitative features using scatterplot this can be done with plt scatter the following code produces scatterplot of 'weightagainst 'heightfor the nutri data scatterplot plt scatter nutri height nutri weight = marker =' 'plt xlabel ('height 'plt ylabel ('weight 'plt show ( weight height figure scatterplot of 'weightagainst 'heightthe next python code illustrates that it is possible to produce highly sophisticated scatter plotssuch as in figure the figure shows the birth weights (massof babies whose mothers smoked (blue trianglesor not (red circlesin additionstraight lines were fitted to the two groupssuggesting that birth weight decreases with age when the mother smokesbut increases when the mother does not smokethe question is whether these trends are statistically significant or due to chance we will revisit this data set later on in the book