diff --git a/doc/api.rst b/doc/api.rst index 40f9add3c57..b176e3d5e3f 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -614,8 +614,8 @@ Plotting :toctree: generated/ Dataset.plot + plot.scatter DataArray.plot - Dataset.plot.scatter plot.plot plot.contourf plot.contour diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 8d917608621..2b9eb4b6dd6 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -15,8 +15,8 @@ What's New .. _whats-new.0.14.0: -v0.14.0 (unreleased) --------------------- +v0.14.0 (14 Oct 2019) +--------------------- Breaking changes ~~~~~~~~~~~~~~~~ @@ -42,42 +42,43 @@ Breaking changes (:issue:`3222`, :issue:`3293`, :issue:`3340`, :issue:`3346`, :issue:`3358`). By `Guido Imperiale `_. -- Dropped the 'drop=False' optional parameter from :meth:`Variable.isel`. - It was unused and doesn't make sense for a Variable. - (:pull:`3375`) by `Guido Imperiale `_. + +- Dropped the `drop=False` optional parameter from :meth:`Variable.isel`. + It was unused and doesn't make sense for a Variable. (:pull:`3375`). + By `Guido Imperiale `_. - Remove internal usage of `collections.OrderedDict`. After dropping support for Python <=3.5, most uses of `OrderedDict` in Xarray were no longer necessary. We have removed the internal use of the `OrderedDict` in favor of Python's builtin `dict` object which is now ordered itself. This change will be most obvious when interacting with the `attrs` property on the Dataset and DataArray objects. - - (:issue:`3380`, :issue:`3389`). By `Joe Hamman `_. + (:issue:`3380`, :pull:`3389`). By `Joe Hamman `_. New functions/methods ~~~~~~~~~~~~~~~~~~~~~ - Added :py:func:`~xarray.map_blocks`, modeled after :py:func:`dask.array.map_blocks`. Also added :py:meth:`Dataset.unify_chunks`, :py:meth:`DataArray.unify_chunks` and - :py:meth:`testing.assert_chunks_equal`. By `Deepak Cherian `_ - and `Guido Imperiale `_. + :py:meth:`testing.assert_chunks_equal`. (:pull:`3276`). + By `Deepak Cherian `_ and + `Guido Imperiale `_. Enhancements ~~~~~~~~~~~~ - :py:class:`~xarray.core.GroupBy` enhancements. By `Deepak Cherian `_. - - Added a repr. Example:: + - Added a repr (:pull:`3344`). Example:: >>> da.groupby("time.season") DataArrayGroupBy, grouped over 'season' 4 groups with labels 'DJF', 'JJA', 'MAM', 'SON' - Added a ``GroupBy.dims`` property that mirrors the dimensions - of each group.(:issue:`3344`) + of each group (:issue:`3344`). - Speed up :meth:`Dataset.isel` up to 33% and :meth:`DataArray.isel` up to 25% for small - arrays (:issue:`2799`, :pull:`3375`) by + arrays (:issue:`2799`, :pull:`3375`). By `Guido Imperiale `_. Bug fixes @@ -107,16 +108,14 @@ Documentation By `Gregory Gundersen `_. - Created a "How do I..." section (:ref:`howdoi`) for solutions to common questions. (:pull:`3357`). By `Deepak Cherian `_. -- Add examples for :py:meth:`Dataset.swap_dims` and :py:meth:`DataArray.swap_dims`. - By `Justus Magin `_. +- Add examples for :py:meth:`Dataset.swap_dims` and :py:meth:`DataArray.swap_dims` + (pull:`3331`, pull:`3331`). By `Justus Magin `_. - Add examples for :py:meth:`align`, :py:meth:`merge`, :py:meth:`combine_by_coords`, :py:meth:`full_like`, :py:meth:`zeros_like`, :py:meth:`ones_like`, :py:meth:`Dataset.pipe`, - :py:meth:`Dataset.assign`, :py:meth:`Dataset.reindex`, :py:meth:`Dataset.fillna`. + :py:meth:`Dataset.assign`, :py:meth:`Dataset.reindex`, :py:meth:`Dataset.fillna` (pull:`3328`). By `Anderson Banihirwe `_. - Fixed documentation to clean up an unwanted file created in ``ipython`` example - (:pull:`3353`). - By `Gregory Gundersen `_. - + (:pull:`3353`). By `Gregory Gundersen `_. .. _whats-new.0.13.0: diff --git a/xarray/core/dataarray.py b/xarray/core/dataarray.py index 81cfd888ab5..4a48f13b86d 100644 --- a/xarray/core/dataarray.py +++ b/xarray/core/dataarray.py @@ -2543,7 +2543,7 @@ def _copy_attrs_from(self, other: Union["DataArray", Dataset, Variable]) -> None @property def plot(self) -> _PlotMethods: """ - Access plotting functions + Access plotting functions for DataArray's >>> d = DataArray([[1, 2], [3, 4]]) diff --git a/xarray/core/dataset.py b/xarray/core/dataset.py index 3933de7b62b..6123b42b77e 100644 --- a/xarray/core/dataset.py +++ b/xarray/core/dataset.py @@ -5243,8 +5243,8 @@ def imag(self): @property def plot(self): """ - Access plotting functions. Use it as a namespace to use - xarray.plot functions as Dataset methods + Access plotting functions for Datasets. + Use it as a namespace to use xarray.plot functions as Dataset methods >>> ds.plot.scatter(...) # equivalent to xarray.plot.scatter(ds,...) diff --git a/xarray/plot/__init__.py b/xarray/plot/__init__.py index c3333acf7f5..af533163714 100644 --- a/xarray/plot/__init__.py +++ b/xarray/plot/__init__.py @@ -1,5 +1,6 @@ from .facetgrid import FacetGrid from .plot import contour, contourf, hist, imshow, line, pcolormesh, plot, step +from .dataset_plot import scatter __all__ = [ "plot", @@ -11,4 +12,5 @@ "imshow", "pcolormesh", "FacetGrid", + "scatter" ]