this could also have been written more explicitly asplot(randn( cumsum()color=' 'linestyle='dashed'marker=' 'for line plotsyou will notice that subsequent points are linearly interpolated by default this can be altered with the drawstyle optionin [ ]data randn( cumsum(in [ ]plt plot(data' --'label='default'out[ ][in [ ]plt plot(data' -'drawstyle='steps-post'label='steps-post'out[ ][in [ ]plt legend(loc='best'tickslabelsand legends for most kinds of plot decorationsthere are two main ways to do thingsusing the procedural pyplot interface (which will be very familiar to matlab usersand the more object-oriented native matplotlib api the pyplot interfacedesigned for interactive useconsists of methods like xlimxticksand xticklabels these control the plot rangetick locationsand tick labelsrespectively they can be used in two wayscalled with no arguments returns the current parameter value for example plt xlim(returns the current axis plotting range brief matplotlib api primer www it-ebooks info