home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 386922376

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/2107#issuecomment-386922376 https://api.github.com/repos/pydata/xarray/issues/2107 386922376 MDEyOklzc3VlQ29tbWVudDM4NjkyMjM3Ng== 6164157 2018-05-06T22:40:43Z 2018-05-07T20:31:19Z CONTRIBUTOR

Example code to demonstrate functionality:

```python import xarray as xr import numpy as np import pandas as pd

np.random.seed(0) tm = pd.date_range('2000-01-01', end='2000-01-02', freq='H') d4 = xr.DataArray(np.random.randn(len(tm), 6, 3, 3), dims=['time', 'x', 'text_dim', 'z'], coords=[tm, range(6), ['foo', 'bar', 'foobar'], [3.5, 4.9, 6.7]], name='arr_name') d3 = d4[..., 0].drop('z') d2 = d3[..., 0].drop('text_dim')

generate a faceted 4-dimensional plot:

d4.plot(hue='text_dim', col='x', row='z')

or equivalently:

d4.plot.line(x='time', col='x', row='z')

````

python d3.plot(col='x', row='text_dim')

python d2.plot(hue='x')

python d3.plot.line(col='x', col_wrap=3, hue='text_dim')

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  320632674
Powered by Datasette · Queries took 0.639ms · About: xarray-datasette