writing ipython notebooks executing these statements results in plot in the browsersee fig it was popular to start the notebook by ipython notebook -pylab to import everything from numpy and matplotlib pyplot and make all plots inlinebut the -pylab option is now officially discouraged if you want the notebook to behave more as matlab and not use the np and plt prefixyou can instead of the first three lines above write %pylab fig example on an ipython notebook