hvPlot 0.10 has just been released! Checkout the blog post and support hvPlot by giving it a 🌟 on Github.


import hvplot.xarray  # noqa
import xarray as xr

hist is often a good way to start looking at data to get a sense of the distribution. Similar methods include kde (also available as density).

ds = xr.tutorial.open_dataset('air_temperature').load()
air = ds.air
air1d = air.sel(lon=285.,lat=40.)
<xarray.DataArray 'air' (time: 2920)> Size: 23kB
array([276.  , 276.79, 276.  , ..., 271.09, 270.29, 270.49])
    lat      float32 4B 40.0
    lon      float32 4B 285.0
  * time     (time) datetime64[ns] 23kB 2013-01-01 ... 2014-12-31T18:00:00
    long_name:     4xDaily Air temperature at sigma level 995
    units:         degK
    precision:     2
    GRIB_id:       11
    GRIB_name:     TMP
    var_desc:      Air temperature
    dataset:       NMC Reanalysis
    level_desc:    Surface
    statistic:     Individual Obs
    parent_stat:   Other
    actual_range:  [185.16 322.1 ]

Customize the plot by changing the title and bar color.

air1d.hvplot.hist(title="Air Temperature over time at lat=40,lon285", color='gray')