title: What is the difference between importing matplotlib and matplotlib.pyplot?
body: <p>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:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  </code></pre>
  
  <p>only import this particular submodule and nothing else? I had to do this in order to get access to the <code>hist</code> function. How does that affect the modules normally imported when calling <code>import matplotlib as plt</code>? Can I get all the modules in matplotlib together under the plt name?</p>
  
  <p>I'm aware that this question is related to <a href="https://stackoverflow.com/questions/22840671/what-is-the-difference-between-importing-python-sub-modules-from-numpy-matplotl">what is the difference between importing python sub-modules from NumPy, matplotlib packages</a> 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. </p>