2

I am trying to sketch a feature pairwise plot using pandas.plotting , scatter_matrix function but I get the following error that I cant understand the meaning or what I should do to fix it:

from matplotlib import cm
        from pandas.plotting import scatter_matrix as sm
        import matplotlib.pyplot as plt
        `enter code here`import pandas as pd

    cmap = cm.get_cmap('gnuplot')
    scatter = sm(X_train, c=y_train, marker="o", s=40, hist_kwds={ 'bins': 15}, figsize=(12, 12), cmap=cmap)
/usr/local/lib/python3.7/site-packages/pandas/plotting/_matplotlib/tools.py:304: MatplotlibDeprecationWarning: 
The rowNum attribute was deprecated in Matplotlib 3.2 and will be removed two minor releases later. Use ax.get_subplotspec().rowspan.start instead.
  if not layout[ax.rowNum + 1, ax.colNum]:
/usr/local/lib/python3.7/site-packages/pandas/plotting/_matplotlib/tools.py:304: MatplotlibDeprecationWarning: 
The colNum attribute was deprecated in Matplotlib 3.2 and will be removed two minor releases later. Use ax.get_subplotspec().colspan.start instead.
  if not layout[ax.rowNum + 1, ax.colNum]
moti
  • 21
  • 1
  • 2

2 Answers2

1

I had the same issue and it was indeed an issue with pandas. This issue has been recognised, and fixed - simply getting the latest Version of Pandas should do the trick.

Andreas G.
  • 190
  • 11
0

It seems that it's something to do with pandas internal plotting functions. I had the same error, but when I changed from df['col'].plot() to plt.plot(df['col'] the error disappeared.

Pryderide
  • 153
  • 1
  • 10