title: Matplotlib giving error after upgrade: "ValueError: s must be a scalar, or the same size as x and y"
body: <p>I've recently upgraded matplotlib from 3.1.2 to 3.3.0 and am running into this error (which I don't get on 3.1.2): &quot;ValueError: s must be a scalar, or the same size as x and y&quot;.  In the example below, I'm simply trying to scatter plot a pandas groupby object and all columns have the same number of values and same dimensions.</p>
  <pre><code>import pandas as pd
  import numpy as np
  import sys, os, time
  import matplotlib.pyplot as plt
  
  headers=['Cpl Time','ECT','PendAtStart','OpCode']
  tableData=[[1,111.1,11,'Read'],[2,222.2,22,'Write'],[3,333.3,33,'Read'],[4,444.4,44,'Write'],[5,555.5,55,'Read']]
  df = pd.DataFrame(tableData,columns=headers)
  
  cols = ['ECT','PendAtStart','Cpl Time']
  print(&quot;{:20} Shape, Len&quot;.format('Column'))
  for col in df.columns:
      print(&quot;{:20} {},  {}&quot;.format(col, df[col].shape, len(df[col])))
  
  plt.rcParams['figure.figsize'] = [15,10]
  fig, ax = plt.subplots()
  
  currMarker=0
  grouped = df.groupby('OpCode')
  for key, group in grouped:
          group.plot(ax=ax, kind='scatter', x='Cpl Time', y='ECT', label=key, s=grouped.PendAtStart) 
  plt.show()
  </code></pre>
  <p>even if I change the line to attempt to use the SAME exact column for x, y and s:</p>
  <pre><code>group.plot(ax=ax, kind='scatter', x='ECT', y='ECT', label=key, s=grouped['ECT']) 
  </code></pre>
  <p>it still returns the error (traceback):</p>
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-54-195485ba7482&gt; in &lt;module&gt;
        6 for key, group in grouped:
        7         print(&quot;Key:{}&quot;.format(key))
  ----&gt; 8         group.plot(ax=ax, kind='scatter', x='Cpl Time', y='ECT', label=key, s=df.PendAtStart)
        9 plt.show()
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\pandas\plotting\_core.py in __call__(self, *args, **kwargs)
      736         if kind in self._dataframe_kinds:
      737             if isinstance(data, ABCDataFrame):
  --&gt; 738                 return plot_backend.plot(data, x=x, y=y, kind=kind, **kwargs)
      739             else:
      740                 raise ValueError(
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\pandas\plotting\_matplotlib\__init__.py in plot(data, kind, **kwargs)
       60             kwargs[&quot;ax&quot;] = getattr(ax, &quot;left_ax&quot;, ax)
       61     plot_obj = PLOT_CLASSES[kind](data, **kwargs)
  ---&gt; 62     plot_obj.generate()
       63     plot_obj.draw()
       64     return plot_obj.result
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\pandas\plotting\_matplotlib\core.py in generate(self)
      279         self._compute_plot_data()
      280         self._setup_subplots()
  --&gt; 281         self._make_plot()
      282         self._add_table()
      283         self._make_legend()
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\pandas\plotting\_matplotlib\core.py in _make_plot(self)
      967             label=label,
      968             cmap=cmap,
  --&gt; 969             **self.kwds
      970         )
      971         if cb:
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\matplotlib\__init__.py in inner(ax, data, *args, **kwargs)
     1429     def inner(ax, *args, data=None, **kwargs):
     1430         if data is None:
  -&gt; 1431             return func(ax, *map(sanitize_sequence, args), **kwargs)
     1432
     1433         bound = new_sig.bind(ax, *args, **kwargs)
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\matplotlib\cbook\deprecation.py in wrapper(*inner_args, **inner_kwargs)
      409                          else deprecation_addendum,
      410                 **kwargs)
  --&gt; 411         return func(*inner_args, **inner_kwargs)
      412
      413     return wrapper
  
  c:\users\klo75358\appdata\local\programs\python\python37\lib\site-packages\matplotlib\axes\_axes.py in scatter(self, x, y, s, c, marker, cmap, norm, vmin, vmax, alpha, linewidths, verts, edgecolors, plotnonfinite, **kwargs)
     4446         s = np.ma.ravel(s)
     4447         if len(s) not in (1, x.size):
  -&gt; 4448             raise ValueError(&quot;s must be a scalar, or the same size as x and y&quot;)
     4449
     4450         c, colors, edgecolors = \
  
  ValueError: s must be a scalar, or the same size as x and y
  </code></pre>
  <p>Again, with Matplotlib 3.1.2 this code snippet produces a graph and no error... any suggestions/input would be greatly appreciated!</p>