Skip to content
Open
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
28 changes: 21 additions & 7 deletions xdggs/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,18 @@ def zoom_to(self, level: int):

return xr.DataArray(zoomed, coords={self._name: self.cell_ids}, dims=dims)

def explore(self, *, cmap="viridis", center=None, alpha=None, coords=None):
def explore(
self,
*,
cmap="viridis",
center=None,
vmin=None,
vmax=None,
alpha=None,
coords=None,
view=None,
basemap=None,
):
"""interactively explore the data using `lonboard`

Requires `lonboard`, `matplotlib`, and `arro3.core` to be installed.
Expand All @@ -233,13 +244,16 @@ def explore(self, *, cmap="viridis", center=None, alpha=None, coords=None):
-----
Plotting currently is restricted to 1D `DataArray` objects.
"""
if isinstance(self._obj, xr.Dataset):
raise ValueError("does not work with Dataset objects, yet")

return explore(
self._obj,
cmap=cmap,
center=center,
alpha=alpha,
colorize_params={
"cmap": cmap,
"center": center,
"vmin": vmin,
"vmax": vmax,
"alpha": alpha,
},
coords=coords,
view=view,
basemap=basemap,
)
255 changes: 0 additions & 255 deletions xdggs/plotting.py

This file was deleted.

Loading
Loading