Confusion between numpy, scipy, matplotlib and pylab
Scipy and numpy are scientific projects whose aim is to bring efficient and fast numeric computing to python.
Matplotlib is the name of the python plotting library.
Pyplot is an interactive api for matplotlib, mostly for use in notebooks like jupyter. You generally use it like this: import matplotlib.pyplot as plt
.
Pylab is the same thing as pyplot, but with extra features (its use is currently discouraged).
- pylab = pyplot + numpy
See more information here: Matplotlib, Pylab, Pyplot, etc: What's the difference between these and when to use each?
No,
pylab
is part ofmatplotlib
(inmatplotlib.pylab
) and tries to give you a MatLab like environment.matplotlib
has a number of dependencies, among themnumpy
which it imports under the common aliasnp
.scipy
is not a dependency ofmatplotlib
.If you run
ipython --pylab
an automatic import will put all symbols frommatplotlib.pylab
into global scope. Like you wrotenumpy
gets imported under thenp
alias. Symbols frommatplotlib
are available under thempl
alias.