title: matplotlib error: x and y must be the same size
body: <p>How can I fix ‘ValueError: x and y must be the same size` error?</p>
  <p>The idea of the code is that from different sensors of temperature and NO data applied the model of Multivariate Linear Regression. To train the model and see the results correlated among them, as well as the prediction as a whole.</p>
  <pre><code>from sklearn import linear_model
  from sklearn.linear_model import LinearRegression
  from sklearn.model_selection import train_test_split
  import pandas as pd
  import matplotlib.pyplot as plt
  
  # Name of de file
  filename = 'NORM_AC_HAE.csv'
  file = 'NORM_NABEL_HAE_lev1.csv'
  
  # Read the data
  data=pd.read_csv(filename)
  data_other=pd.read_csv(file)
  
  col = ['Aircube.009.0.no.we.aux.ch6', 'Aircube.009.0.sht.temperature.ch1']
  X = data.loc[:, col]
  Y = data_other.loc[:,'NO.ppb']
  
  # Fitting the Liner Regression to training set
  X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size = 0.3, train_size = 0.6, random_state = np.random.seed(0))
  mlr = LinearRegression()
  mlr.fit(X_train, y_train)
  
  # Visualization of the test set results
  plt.figure(2)
  plt.scatter(y_test, X_test) #The VALUE ERROR appears here
  </code></pre>
  <p>The Error Code is:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\andre\Desktop\UV\4o\TFG\EMPA\dataset_Mila\MLR_no_temp_hae_no.py&quot;, line 65, in &lt;module&gt;
      plt.scatter(y_test, X_test)
    File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\pyplot.py&quot;, line 2864, in scatter
      is not None else {}), **kwargs)
    File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\__init__.py&quot;, line 1810, in inner
      return func(ax, *args, **kwargs)
    File &quot;C:\Users\andre\AppData\Local\Programs\Python\Python37-32\lib\site-packages\matplotlib\axes\_axes.py&quot;, line 4182, in scatter
      raise ValueError(&quot;x and y must be the same size&quot;)
  ValueError: x and y must be the same size
  [Finished in 6.9s]
  
  </code></pre>