I'm still fairly new to python and am wondering if the x.y statement means y is a submodule of x? And if so, doesn't the command:
import matplotlib.pyplot as plt
only import this particular submodule and nothing else? I had to do this in order to get access to the hist function. How does that affect the modules normally imported when calling import matplotlib as plt? Can I get all the modules in matplotlib together under the plt name?
I'm aware that this question is related to what is the difference between importing python sub-modules from NumPy, matplotlib packages But the answer in this question does not tell me if nothing else in matplotlib is imported and how to just import all of matplotlib without worrying about submodules being left out.
plotfunction anymore?import matplotlib.pyplot as pltplt.plot()won't work? Or do you sayimport matplotlib.pyplotand thenplt.plot()?from matplotlib import pyplot as plt. You could sayfrom matplotlib import *, and you'd import every module in matplotlib, including pyplot (and plot by callingmatplotlib.pyplot.plot. However, if you're going to plot stuff,pyplotis probably the only one you'll need.