Skip to content

CI: matplotlib failures #26714

Closed
Closed
@TomAugspurger

Description

@TomAugspurger

https://travis-ci.org/pandas-dev/pandas/jobs/542921706#L2423

=================================== FAILURES ===================================
_______________________ TestDataFramePlots.test_subplots _______________________
[gw1] linux -- Python 3.6.8 /home/travis/miniconda3/envs/pandas-dev/bin/python
self = <pandas.tests.plotting.test_frame.TestDataFramePlots object at 0x7f507ed05128>
    @pytest.mark.slow
    def test_subplots(self):
        df = DataFrame(np.random.rand(10, 3),
                       index=list(string.ascii_letters[:10]))
    
        for kind in ['bar', 'barh', 'line', 'area']:
            axes = df.plot(kind=kind, subplots=True, sharex=True, legend=True)
            self._check_axes_shape(axes, axes_num=3, layout=(3, 1))
            assert axes.shape == (3, )
    
            for ax, column in zip(axes, df.columns):
                self._check_legend_labels(ax,
                                          labels=[pprint_thing(column)])
    
            for ax in axes[:-2]:
                self._check_visible(ax.xaxis)  # xaxis must be visible for grid
                self._check_visible(ax.get_xticklabels(), visible=False)
                self._check_visible(
>                   ax.get_xticklabels(minor=True), visible=False)
pandas/tests/plotting/test_frame.py:387: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <pandas.tests.plotting.test_frame.TestDataFramePlots object at 0x7f507ed05128>
collections = <a list of 2 Text xticklabel objects>, visible = False
    def _check_visible(self, collections, visible=True):
        """
        Check each artist is visible or not
    
        Parameters
        ----------
        collections : matplotlib Artist or its list-like
            target Artist or its list or collection
        visible : bool
            expected visibility
        """
        from matplotlib.collections import Collection
        if not isinstance(collections,
                          Collection) and not is_list_like(collections):
            collections = [collections]
    
        for patch in collections:
>           assert patch.get_visible() == visible
E           AssertionError
pandas/tests/plotting/common.py:137: AssertionError

I'm looking into it now, but will have to go in 30 minutes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions