Line#
import hvplot.xarray # noqa
import xarray as xr
line
is useful when data is continuous and has a continuous axis.
ds = xr.tutorial.open_dataset('air_temperature').load()
air = ds.air
air1d = air.sel(lon=285.,lat=40.)
air1d
<xarray.DataArray 'air' (time: 2920)> Size: 23kB array([276. , 276.79, 276. , ..., 271.09, 270.29, 270.49]) Coordinates: lat float32 4B 40.0 lon float32 4B 285.0 * time (time) datetime64[ns] 23kB 2013-01-01 ... 2014-12-31T18:00:00 Attributes: 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 ]
air1d.hvplot.line()
Customize the plot by changing the title and line color.
air1d.hvplot.line(title="Air Temperature over time at lat=40,lon285",line_color='gray')
This web page was generated from a Jupyter notebook and not all
interactivity will work on this website.