pydata / pydata/xarray

DataTree: Auto-plotting capabilities

Open
#9,270 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement topic-DataTree topic-plotting
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

Is your feature request related to a problem?

Xarray is already capable of smart plotting data arrays and in some extents, datasets.

Xarray has limited support for plotting Dataset variables against each other.

https://docs.xarray.dev/en/latest/user-guide/plotting.html

Describe the solution you'd like

The rich display tree structure could be reused with a default .plot() call inside of it, for example.

However, it is also a change that would concern Datasets themselves as there is no way currently plot all the variables of a Dataset.

Experience feedback: oftentimes I convert a Dataset to a DataArray with ds.to_array() for plotting with facets. This is possible when variables of the dataset have the same dimensions.

Describe alternatives you've considered

Making visualization functions myself. However, the capacity to "just plot" data is often welcomed!

Additional context

Issue content taken from https://github.com/xarray-contrib/datatree/issues/336

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the xarray plotting documentation and the existing .plot() and ds.to_array() entry points mentioned in the issue. Determine how Dataset variables and the DataTree rich display should interact, then define the expected behavior for plotting variables against each other and confirm it with appropriate coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.