we define outliers in box-and-whisker plot as anything beyond times the interquartile rangeor the size of the box sowe take the size of the box times and up to that point on the dotted whiskerswe call those parts outer quartiles but anything outside of the outer quartiles is considered an outlierand that' what the lines beyond the outer quartiles represent that' where we are defining outliers based on our definition with the box-andwhisker plot some points to remember about box-and-whisker plotsthey are useful for visualizing the spread and skew of data the line in the middle of the box represents the median of the dataand the box represents the bounds of the st and rd quartiles half of the data exists within the box the "whiskersindicate the range of the data-except for outlierswhich are plotted outside the whiskers outliers are times or more the interquartile range nowjust to give you an example herewe have created fake dataset the following example creates uniformly distributed random numbers between - and plus few outliers above and below vojgpsn lfxfe oqsboepnsboe  ijhi@pvumjfst oqsboepnsboe  mpx@pvumjfst oqsboepnsboe  ebub oqdpodbufobuf vojgpsn lfxfeijhi@pvumjfstmpx@pvumjfst qmucpyqmpu ebub qmutipx in the codewe have uniform random distribution of data (vojgpsn lfxfethen we added few outliers on the high end (ijhi@pvumjfstand few negative outliers (mpx@pvumjfstas well then we concatenated these lists together and created single dataset from these three different sets that we created using numpy we then took that combined dataset of uniform data and few outliers and we plotted using qmucpyqmpu and that' how you get box-and-whisker plot call tipx to visualize itand there you go