Skip to content

test failures locally with matplotlib: 3.0.3 #26734

Closed
@simonjayhawkins

Description

@simonjayhawkins

since #26715

__________________ TestDataFramePlots.test_df_grid_settings ___________________
[gw1] win32 -- Python 3.7.3 C:\Users\simon\Anaconda3\envs\pandas-dev\python.exe

self = <pandas.tests.plotting.test_frame.TestDataFramePlots object at 0x0000016EE807BD30>

    @pytest.mark.slow
    def test_df_grid_settings(self):
        # Make sure plot defaults to rcParams['axes.grid'] setting, GH 9792
        self._check_grid_settings(
            DataFrame({'a': [1, 2, 3], 'b': [2, 3, 4]}),
>           plotting._core._dataframe_kinds, kws={'x': 'a', 'y': 'b'})

pandas\tests\plotting\test_frame.py:2938:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <pandas.tests.plotting.test_frame.TestDataFramePlots object at 0x0000016EE807BD30>
obj =    a  b
0  1  2
1  2  3
2  3  4, kinds = ['scatter', 'hexbin']
kws = {'x': 'a', 'y': 'b'}

    def _check_grid_settings(self, obj, kinds, kws={}):
        # Make sure plot defaults to rcParams['axes.grid'] setting, GH 9792

        import matplotlib as mpl

        def is_grid_on():
            xticks = self.plt.gca().xaxis.get_major_ticks()
            yticks = self.plt.gca().yaxis.get_major_ticks()
            # for mpl 2.2.2, gridOn and gridline.get_visible disagree.
            # for new MPL, they are the same.

            if self.mpl_ge_3_0_0:
                xoff = all(not g.gridline.get_visible() for g in xticks)
                yoff = all(not g.gridline.get_visible() for g in yticks)
            else:
                xoff = all(not g.gridOn for g in xticks)
                yoff = all(not g.gridOn for g in yticks)

            return not (xoff and yoff)

        spndx = 1
        for kind in kinds:

            self.plt.subplot(1, 4 * len(kinds), spndx)
            spndx += 1
            mpl.rc('axes', grid=False)
            obj.plot(kind=kind, **kws)
>           assert not is_grid_on()
E           AssertionError

cc @TomAugspurger

INSTALLED VERSIONS

commit: 8fe9f69
python: 3.7.3.final.0
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8
LOCALE: None.None

pandas: 0.25.0.dev0+686.g8fe9f69d2
pytest: 4.5.0
pip: 19.1.1
setuptools: 40.6.3
Cython: 0.29.7
numpy: 1.16.3
scipy: 1.2.1
pyarrow: 0.11.1
xarray: 0.12.1
IPython: 7.5.0
sphinx: 2.0.1
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: 1.2.1
tables: 3.5.1
numexpr: 2.6.9
feather: None
matplotlib: 3.0.3
openpyxl: 2.6.2
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.8
lxml.etree: 4.3.3
bs4: 4.7.1
html5lib: 1.0.1
sqlalchemy: 1.3.3
pymysql: None
psycopg2: None
jinja2: 2.10.1
s3fs: 0.2.1
fastparquet: 0.3.0
pandas_gbq: None
pandas_datareader: None
gcsfs: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    CIContinuous IntegrationDependenciesRequired and optional dependenciesRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions