home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 106562046

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
106562046 MDU6SXNzdWUxMDY1NjIwNDY= 575 1D line plot with data on the x axis 1197350 closed 0     13 2015-09-15T13:56:51Z 2018-03-05T22:14:46Z 2018-03-05T22:14:46Z MEMBER      

Consider the following Dataset, representing a function f = cos(z)

python z = np.arange(10) ds = xray.Dataset( {'f': ('z', np.cos(z))}, coords={'z': z})

If I call

python ds.f.plot()

xray naturally puts "z" on the x-axis.

However, since z represents the vertical dimension, it would be more natural do put it on the y-axis, i.e.

python plt.plot(ds.f, ds.z)

This is conventional in atmospheric science and oceanography for buoy data or balloon data.

Is there an easy way to do this with xray's plotting functions? I scanned the code and didn't see an obvious solution, but maybe I missed it.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/575/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

  • 1 row from issues_id in issues_labels
  • 13 rows from issue in issue_comments
Powered by Datasette · Queries took 0.722ms · About: xarray-datasette