home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 317853953

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
317853953 MDU6SXNzdWUzMTc4NTM5NTM= 2084 New Feature: Add FacetGrid functionality to plot.line() 6164157 closed 0     5 2018-04-26T02:18:41Z 2018-06-15T05:13:40Z 2018-06-15T05:13:40Z CONTRIBUTOR      

When data is more than 2 dimensional, plot() creates a FacetGrid where each facet gets plots two dimensional data. I would find it very useful to have similar functionality for line plots.

Let's define three DataArrays, of 2,3 and 4 dimensions, named d2, d3 and d4.

```python d4=xr.DataArray(np.random.randn(3,4,5,6), dims=['x','y','z','w'], coords=[range(3),range(4),range(5),range(6)]) d3=d4[...,0].drop('w') d2=d3[...,0].drop('z')

d4.plot(row='x', col='y') #creates a 2d facet grid, each facet is a pcolormesh d3.plot(col='x') #creates a 1d facet grid, each facet is a pcolormesh plt.show() ```

It would be very useful to have a similar interface for line plots too. That is, I would expect python d2.plot.line(row='y', x='x') to create a row of panels, each having one line. Similarly, I would expect ```python d3.plot.line(col='y', x='x')

or alternatively

d3.plot.line(col='y', hue='z') to create a row of panels, each having a series of lines, with `hue` corresponding to `z` and so forth. Finally,python d4.plot.line(row='z',col='y', x='x')

or alternatively

d4.plot.line(row='z',col='y', hue='w') `` should create a 2d matrix of panels, each having a series of lines, withhuecorresponding tow`.

This seems to me like a natural generalization of the behaviour of plot(), and I found myself coding manually loops to do that a few times.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2084/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 3 rows from issues_id in issues_labels
  • 5 rows from issue in issue_comments
Powered by Datasette · Queries took 0.551ms · About: xarray-datasette