liesdamned liesand statistics designer used linear scale and narrow range of pricesso the sizes of the changes were exaggerated the code in figure produces the two plots we looked at above and plot intended to give an accurate impression of the movement of housing prices it uses two plotting facilities that we have not yet seen the call pylab bar(quarterspriceswidthproduces bar chart with width wide bars the left edges of the bars are the values of the elements of quarters and the heights of the bars are the values of the corresponding elements of prices the call pylab xticks(quarters+width/ labelsdescribes the labels associated with the bars the first argument specifies where each label is to be placed and the second argument the text of the labels the function yticks behaves analogously def plothousing(impression)"""assumes impression str must be one of 'flat''volatile,and 'fairproduce bar chart of housing prices over time"" open('midwesthousingprices txt'' '#each line of file contains year quarter price #for midwest region of labelsprices ([][]for line in fyearquarterprice line split(label year[ : '\ qquarter[ labels append(labelprices append(float(price)/ quarters pylab arange(len(labels)# coords of bars width #width of bars if impression ='flat'pylab semilogy(pylab bar(quarterspriceswidthpylab xticks(quarters+width/ labelspylab title('housing prices in midwest'pylab xlabel('quarter'pylab ylabel('average price ($ , \' )'if impression ='flat'pylab ylim( ** elif impression ='volatile'pylab ylim( elif impression ='fair'pylab ylim( elseraise valueerror plothousing('flat'pylab figure(plothousing('volatile'pylab figure(plothousing('fair'figure plotting housing prices