home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 265013667

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
265013667 MDU6SXNzdWUyNjUwMTM2Njc= 1630 Option to include units in .plot() 14314623 closed 0     2 2017-10-12T16:53:57Z 2018-06-12T00:33:49Z 2018-06-12T00:33:23Z CONTRIBUTOR      

I find myself editing the label on the colorbar of xarray plots often to include the units of the plotted variable. Would it be possible to extract the value of DataArray.attrs['units] (if present) and add it to the colorbar label?

Given an example DataArray with name='temperature' and attrs['units']='deg C', the current colorbar label says 'temperature'.

A 'plot_units' keyword could possibly be used like this for example:

python da.plot(plot_units=True) Then the colorbar label should be 'temperature [deg C]'.

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

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.753ms · About: xarray-datasette