title: Importing Matplotlib
body: <h2>Original question</h2>
  
  <p>I am new to Python and I am learning matplotlib.  I am following the video tutorial recommended in the official User Manual of matplotlib: 'Plotting with matplotlib' by Mike Muller.  The instructor does not show how he imports matplotlib but proceeds instantly with commands such as plot(x, linear, x, square), where x a sequence he has defined.</p>
  
  <p>I tried to run</p>
  
  <pre><code>import matplotlib 
  from matplotlib import pyplot as plt
  import numpy as np
  import pandas as pd
  x = np.arange(100)
  lines = plot(x, 'linear', 'g:+', x, 'square','r-o')
  </code></pre>
  
  <p>and got the error</p>
  
  <pre><code>NameError: name 'plot' is not defined
  </code></pre>
  
  <h2>Updated question after solving the import issue</h2>
  
  <p>When I try to replicate the examples shown I get an error. Here is the code:</p>
  
  <pre><code>from matplotlib.pyplot import *
  import numpy as np
  import pandas as pd
  x = np.arange(100)
  lines = plot(x, 'linear', 'g:+', x, 'square','r-o')
  
  ValueError: x and y must have same first dimension
  </code></pre>
  
  <p>Since I am simply repeating the commands shown in the tutorial I can not understand what I am doing wrong. </p>
  
  <p>Your advice will be appreciated.</p>