lair.inventories.Inventory.plot#

Inventory.plot(ax=None, time='mean', sector=None, **kwargs)[source]#

Plot the inventory data.

Parameters:
  • ax (matplotlib.axes.Axes) – The axes to plot on.

  • time (str | int, optional) – The time step to plot, by default ‘mean’. If ‘mean’, the mean of every time step is plotted, which reads all of them: for the 53 years of EDGAR v8 CH4 that takes about a minute. Otherwise pass a string selector or integer index, such as "2022-01-01" or -1 (the last), to read one step.

  • sector (str, optional) – The sector to plot, by default None. If None, the total emissions are plotted.

  • kwargs (dict) – Additional keyword arguments to pass to xarray’s plot method.

Returns:

matplotlib.axes.Axes – The axes with the plot.

Return type:

Axes

Notes

Without ax the plot gets a new cartopy GeoAxes in PlateCarree. Only the field is drawn, with no state lines, coastlines or tick labels. The maps example times the default time step and adds them.

See also

lair.geo.plot_grid

Draws a grid’s cell edges on a map.

Examples

The last year, one sector:

ax = inv.plot(time=-1, sector="Solid_waste_landfills")