for the rest of this sectionit is assumed that matplotlib pyplotpandasand numpyhave been imported in the python code as follows import matplotlib pyplot as plt import pandas as pd import numpy as np plotting qualitative variables suppose we wish to display graphically how many elderly people are living by themselvesas couplewith familyor other recall that the data are given in the situation column of our nutri data assuming that we already restructured the dataas in section we can make barplot of the number of people in each category via the plt bar function of the standard matplotlib plotting library the inputs are the -axis positionsheightsand widths of each bar respectively width the width of the bars [ the bar positions on -axis situation_counts nutri ['situation 'value_counts (plt bar(xsituation_counts width edgecolor 'black 'plt xticks (xsituation_counts index plt show ( couple single family figure barplot for the qualitative variable 'situationplotting quantitative variables we now present few useful methods for visualizing quantitative dataagain using the nutri data set we will first focus on continuous features ( 'age'and then add some specific graphs related to discrete features ( 'tea'the aim is to describe the variability present in single feature this typically involves central tendencywhere observations tend to gather aroundwith fewer observations further away the main aspects of the distribution are the location (or centerof the variabilitythe spread of the variability (how far the values extend from the center)and the shape of the variabilitye whether or not values are spread symmetrically on either side of the center barplot