title: bar() missing 1 required positional argument: 'left'
body: <p>I am trying to perform a principal component analysis and plot the scree plot using matplotlib function <code>bar()</code>. I observe this error while running the following code.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from sklearn.decomposition import PCA
  from sklearn import preprocessing
  import matplotlib.pyplot as plt
  
  scaled_data = preprocessing.scale(data.T)
  pca=PCA()
  pca.fit(scaled_data)
  pca_data = pca.transform(scaled_data)
  per_var = np.round(pca.explained_variance_ratio_*100, decimals=1)
  
  labels = ['PC'+str(i) for i in range(1,len(per_var)+1)]
  plt.bar(x=range(1,len(per_var)+1), height=per_var, tick_label=labels)
  plt.xlabel('Principal Component')
  plt.ylabel('Percentage of Variance Explained')
  plt.title('Scree Plot')
  plt.show()
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>TypeError: bar() missing 1 required positional argument: 'left'
  </code></pre>