You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug in scatter_matrix when using subplots and passing the desired ax parameter. I checked with other functions in pandas.plotting (e.g. lag_plot shown above as a commented line) and works as it should. However, for some reason, scatter_matrix shows the warning UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared.
The previous code outputs a single plot as described in the warning:
Expected Behavior
The scatter_matrix should be shown in the second subplot, similar to this image in which the output of lag_plot is used instead:
Installed Versions
1.4.0
INSTALLED VERSIONS
commit : bb1f651
python : 3.9.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.13.0-27-generic
Version : #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
There is a bug in
scatter_matrix
when using subplots and passing the desiredax
parameter. I checked with other functions inpandas.plotting
(e.g.lag_plot
shown above as a commented line) and works as it should. However, for some reason,scatter_matrix
shows the warningUserWarning: To output multiple subplots, the figure containing the passed axes is being cleared.
The previous code outputs a single plot as described in the warning:
Expected Behavior
The scatter_matrix should be shown in the second subplot, similar to this image in which the output of
lag_plot
is used instead:Installed Versions
1.4.0
INSTALLED VERSIONS
commit : bb1f651
python : 3.9.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.13.0-27-generic
Version : #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.0
numpy : 1.21.2
pytz : 2021.3
dateutil : 2.8.2
pip : 21.2.4
setuptools : 58.0.4
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.5.0
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.7.3
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
zstandard : None
None
The text was updated successfully, but these errors were encountered: