Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix for matplotlib>=3.4.0 #960

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open

Conversation

timovwb
Copy link

@timovwb timovwb commented Dec 14, 2021

The arguments to _process_unit_info changed in matplotlib 3.4.0 (current latest is 3.5.1). This pull request makes the required change.

Note that this will of course break for installations with matplotlib<3.4.0.

Related issue: #953

@ekalosak
Copy link
Contributor

Make sure the dependency specifications reflect the deprecation of matplotlib<3.4.0 and then this looks good.

@i-aki-y
Copy link

i-aki-y commented Aug 1, 2022

@timovwb Can I take over this fix?

@ekalosak
The current setup.conf seems to specify matplotlib version 3.0.0 for python 3.5.
Does this mean we need to stop support for py3.5 to apply this PR?

GPy/setup.py

Lines 120 to 126 in f63ed48

install_requirements = ['numpy>=1.7', 'six', 'paramz>=0.9.0', 'cython>=0.29']
matplotlib_version = 'matplotlib==3.3.4'
if sys.version_info < (3, 6):
install_requirements += ['scipy>=1.3.0,<1.5.0']
matplotlib_version = 'matplotlib==3.0.0'
else:
install_requirements += ['scipy>=1.3.0']

Or do we need other workarounds? ex.

try:
    # for matplotlib <= 3.3.4
    ax._process_unit_info(xdata=X, ydata=y1)
    ax._process_unit_info(ydata=y2)
except TypeError:
    # for matplotlib > 3.4.0
    ax._process_unit_info([("x", X), ("y", y1)], convert=False)
    ax._process_unit_info([("y", y2)], convert=False)

@timovwb
Copy link
Author

timovwb commented Aug 1, 2022

@i-aki-y Definitely, go ahead.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants