Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ Bug fixes
- The ``variables``, ``attrs``, and ``dimensions`` properties have been
deprecated as part of a bug fix addressing an issue where backends were
unintentionally loading the datastores data and attributes repeatedly during
writes (:issue:`1798`).
writes (:issue:`1798`).
By `Joe Hamman <https://github.com/jhamman>`_.
- Compatibility fixes to plotting module for Numpy 1.14 and Pandas 0.22
(:issue:`1813`).
By `Joe Hamman <https://github.com/jhamman>`_.

.. _whats-new.0.10.0:
Expand Down
6 changes: 2 additions & 4 deletions xarray/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ def _valid_other_type(x, types):
"""
Do all elements of x have a type from types?
"""
if not np.issubdtype(np.generic, x.dtype):
return False
else:
return all(any(isinstance(el, t) for t in types) for el in np.ravel(x))
return all(any(isinstance(el, t) for t in types) for el in np.ravel(x))


def _ensure_plottable(*args):
Expand All @@ -57,6 +54,7 @@ def _ensure_plottable(*args):
raise TypeError('Plotting requires coordinates to be numeric '
'or dates.')


def _easy_facetgrid(darray, plotfunc, x, y, row=None, col=None,
col_wrap=None, sharex=True, sharey=True, aspect=None,
size=None, subplot_kws=None, **kwargs):
Expand Down
9 changes: 7 additions & 2 deletions xarray/plot/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ def register_pandas_datetime_converter_if_needed():
# based on https://github.com/pandas-dev/pandas/pull/17710
global _registered
if not _registered:
from pandas.tseries import converter
converter.register()
try:
from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()
except ImportError:
# register_matplotlib_converters new in pandas 0.22
from pandas.tseries import converter
converter.register()
_registered = True


Expand Down