graphing with matplotlib pyplot in this case the only line of code to change from the previous example ispyplot barh(x_valuessizestick_label labelscoloured bars it is also common to colour different bars in the chart in different colours or using different shades this can help to distinguish one bar from another an example is given below