nctoolkit.DataSet.plot

DataSet.plot(vars=None, autoscale=True, out=None, coast=None, **kwargs)

plot: Automatically plot a dataset.

Parameters:
  • vars (str or list) – A string or list of the variables to plot

  • autoscale (bool) – Set to True if you want the colorbar to be scaled to the min/max of the data. Default is True

  • out (str) – Name of output file if you want to save as html. Defaults to None.

  • coast (bool) – Set to True if you want a coastline to show up on spatial map. Default is True if a working version of cartopy is available. It is False otherwise.

  • **kwargs (Optional args to be sent to hvplot)

Return type:

If out is None, returns a hvplot object. Otherwise, saves a html file to the location specified by out.

Examples

If you want to plot all data in a dataset, do the following:

>>> ds.plot()

If you only want to plot a single variable, do the following. Note, this is often faster if you have a large dataset.

>>> ds.plot("var_of_choice")