Skip to content

BUG: MatplotlibDeprecationWarning is_last_row function was deprecated in Matplotlib 3.4 #42791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yinhm opened this issue Jul 29, 2021 · 0 comments · Fixed by #42803
Closed
Assignees
Labels
Compat pandas objects compatability with Numpy or Python functions Dependencies Required and optional dependencies Visualization plotting
Milestone

Comments

@yinhm
Copy link

yinhm commented Jul 29, 2021

Seeing this warning while using

pyfolio.create_returns_tear_sheet(stock_rets)
.../lib/python3.8/site-packages/pandas/plotting/_matplotlib/tools.py:418: MatplotlibDeprecationWarning: 
The is_last_row function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use ax.get_subplotspec().is_last_row() instead.
  if ax.is_last_row():
.../lib/python3.8/site-packages/pandas/plotting/_matplotlib/tools.py:418: MatplotlibDeprecationWarning: 
The is_last_row function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use ax.get_subplotspec().is_last_row() instead.
  if ax.is_last_row():

change tools.py:418 as suggested did fix the warning.

            except IndexError:
                # if gridspec is used, ax.rowNum and ax.colNum may different
                # from layout shape. in this case, use last_row logic
                for ax in axarr:
                    if ax.get_subplotspecis_last_row():
                        continue
                    if sharex or _has_externally_shared_axis(ax, "x"):
                        _remove_labels_from_axis(ax.xaxis)
@yinhm yinhm added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 29, 2021
@lithomas1 lithomas1 added Compat pandas objects compatability with Numpy or Python functions Dependencies Required and optional dependencies Visualization plotting and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Jul 29, 2021
@lithomas1 lithomas1 mentioned this issue Jul 29, 2021
4 tasks
@lithomas1 lithomas1 self-assigned this Jul 29, 2021
@lithomas1 lithomas1 added this to the 1.3.2 milestone Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Dependencies Required and optional dependencies Visualization plotting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants