called with parameters sets the parameter value so plt xlim([ ])sets the axis range to to all such methods act on the active or most recently-created axessubplot each of them corresponds to two methods on the subplot object itselfin the case of xlim these are ax get_xlim and ax set_xlim prefer to use the subplot instance methods myself in the interest of being explicit (and especially when working with multiple subplots)but you can certainly use whichever you find more convenient setting the titleaxis labelsticksand ticklabels to illustrate customizing the axesi'll create simple figure and plot of random walk (see figure - )in [ ]fig plt figure()ax fig add_subplot( in [ ]ax plot(randn( cumsum()to change the axis ticksit' easiest to use set_xticks and set_xticklabels the former instructs matplotlib where to place the ticks along the data rangeby default these locations will also be the labels but we can set any other values as the labels using set_xticklabelsin [ ]ticks ax set_xticks([ ]in [ ]labels ax set_xticklabels(['one''two''three''four''five']rotation= fontsize='small'lastlyset_xlabel gives name to the axis and set_title the subplot title plotting and visualization www it-ebooks info