Skip to content

COMPAT: Support for MPL 1.5 #11145

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

Merged
merged 3 commits into from
Sep 22, 2015
Merged

COMPAT: Support for MPL 1.5 #11145

merged 3 commits into from
Sep 22, 2015

Conversation

TomAugspurger
Copy link
Contributor

closes #11111 (nice issue number)

Testing with tox locally I get 1 failure using either matplotlib 1.4 or 1.5. I may have messed up my tox config though. Still need to cleanup a bunch of stuff, I just threw in changes to get each test passing as I went.

release notes et. al coming tonight or tomorrow. Are we making any changes to the build matrix to run a matplotlib 1.5?

@jreback
Copy link
Contributor

jreback commented Sep 18, 2015

u can add to the channel list (I think I showed this above)

it will thrn pick up the latest version if it's not specified exactly

@jreback jreback added Visualization plotting Compat pandas objects compatability with Numpy or Python functions labels Sep 19, 2015
@jreback jreback added this to the 0.17.0 milestone Sep 19, 2015
self.bp_n_objects = 7
else:
self.bp_n_objects = 8
# Thier dev version is messed up, 0+unknown
if mpl_version[0] == '0' or mpl_version >= LooseVersion('1.5'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prob best to put these in some functions (either in util.testing or top-level here)

@@ -214,7 +214,8 @@

def mpl_style_cb(key):
import sys
from pandas.tools.plotting import mpl_stylesheet
from pandas.tools.plotting import mpl_stylesheet, _update_stylesheet
_update_stylesheet()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty hacky, but mpl_stylesheet is a dict defined in pandas.tools.plotting. I have my matplotlib version check in pandas.util.testing, but I can't run code from that in the main body of pandas.tools.plotting (I'm assuming a circular import).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bah, this doesn't work since you can't set the option multiple times.

@TomAugspurger TomAugspurger force-pushed the mpl15 branch 3 times, most recently from 6afb353 to 0e62a2c Compare September 20, 2015 14:51
try: # mpl optional
import pandas.tseries.converter as conv
conv.register() # needs to override so set_xlim works with str/number
except ImportError:
pass

def _mpl_ge_1_5_0():
import matplotlib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems you already have this in utils.testing?

@jreback
Copy link
Contributor

jreback commented Sep 21, 2015

is this not tested on travis? I don't see the icon

@@ -72,6 +72,7 @@ bash miniconda.sh -b -p $HOME/miniconda || exit 1

conda config --set always_yes yes --set changeps1 no || exit 1
conda update -q conda || exit 1
conda config --add channels tacaswell || exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the conda-forge channel might be better to use here

@TomAugspurger
Copy link
Contributor Author

Travis was flaky yesterday morning. I just pushed some changes, and it's picked up now.

@TomAugspurger TomAugspurger force-pushed the mpl15 branch 3 times, most recently from f88a7d6 to 4557b07 Compare September 21, 2015 17:21
@TomAugspurger
Copy link
Contributor Author

@jreback travis is green. Looks like https://travis-ci.org/pydata/pandas/jobs/81429896 and https://travis-ci.org/pydata/pandas/jobs/81429897 both ran with matplotlib RC1.

@jreback
Copy link
Contributor

jreback commented Sep 21, 2015

make the 3.4 regular build not specify a matplotlib (in requirements-3.4.run). All of the slow tests are running (e.g. 2.7) just fine. But I don't think the fast ones actually are run by travis (in theory they are on 3.3, but that is not build ATM for 1.5.0rc1).

MPL 1.5 seems to have changed the behavior of

ax.scatter(x, y, c='green', color=['blue'])

Since this doesn't really make sense anyway(?) I'm changing
our code so that the user doesn't get into that state.
@TomAugspurger
Copy link
Contributor Author

@jreback done. We'll want to followup and pin it at 1.5 once that's released. I'm assuming the conda-forge channel will continue to track master and we won't want changes there breaking our builds.

jreback added a commit that referenced this pull request Sep 22, 2015
@jreback jreback merged commit f920bf2 into pandas-dev:master Sep 22, 2015
@jreback
Copy link
Contributor

jreback commented Sep 22, 2015

thanks @TomAugspurger

@tacaswell
Copy link
Contributor

@TomAugspurger I don't think we plan to update conda forge from master, just tags.

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 Visualization plotting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

COMPAT: matplotlib v0.15rc1 issues
3 participants