pyresample.plot module

Utility functions for quick and easy display.

pyresample.plot._add_area_info_to_basemap_args(area_def, basemap_args)
pyresample.plot._add_gridlines(axes, nmeridians, nparallels)

Add gridlines: meridians and parallels onto the plot.

pyresample.plot._basemap_get_quicklook(area_def, data, vmin=None, vmax=None, label='Variable (units)', num_meridians=45, num_parallels=10, coast_res='110m', cmap='RdBu_r')

Doing quicklook image plots with Basemap.

pyresample.plot._get_quicklook(area_def, data, vmin=None, vmax=None, label='Variable (units)', num_meridians=45, num_parallels=10, coast_res='110m', cmap='RdBu_r')

Get default cartopy matplotlib plot.

pyresample.plot._sphere_radii(area_def)
Return type:

float | tuple[float, float]

pyresample.plot._translate_coast_resolution_to_cartopy(coast_res)

Translate the coast resolution argument between cartopy and basemap notation.

pyresample.plot.area_def2basemap(area_def, **kwargs)

Get Basemap object from an AreaDefinition object.

Parameters:
  • area_def (object) – geometry.AreaDefinition object

  • **kwargs (Keyword arguments) – Additional initialization arguments for Basemap

Returns:

bmap

Return type:

Basemap object

pyresample.plot.ellps2axis(ellps_name)

Get semi-major and semi-minor axis from ellipsis definition.

Parameters:

ellps_name (str) – Standard name of ellipsis

Returns:

(a, b)

Return type:

semi-major and semi-minor axis

pyresample.plot.save_quicklook(filename, area_def, data, vmin=None, vmax=None, label='Variable (units)', num_meridians=45, num_parallels=10, coast_res='110m', cmap='RdBu_r')

Display and save default quicklook plot.

Parameters:
  • filename (str) – path to output file

  • area_def (object) – geometry.AreaDefinition object

  • data (numpy array | numpy masked array) – 2D array matching area_def. Use masked array for transparent values

  • vmin (float, optional) – Min value for luminescence scaling

  • vmax (float, optional) – Max value for luminescence scaling

  • label (str, optional) – Label for data

  • num_meridians (int, optional) – Number of meridians to plot on the globe

  • num_parallels (int, optional) – Number of parallels to plot on the globe

  • coast_res ({'c', 'l', 'i', 'h', 'f'}, optional) – Resolution of coastlines

pyresample.plot.show_quicklook(area_def, data, vmin=None, vmax=None, label='Variable (units)', num_meridians=45, num_parallels=10, coast_res='110m', cmap='RdBu_r')

Display default quicklook plot.

Parameters:
  • area_def (object) – geometry.AreaDefinition object

  • data (numpy array | numpy masked array) – 2D array matching area_def. Use masked array for transparent values

  • vmin (float, optional) – Min value for luminescence scaling

  • vmax (float, optional) – Max value for luminescence scaling

  • label (str, optional) – Label for data

  • num_meridians (int, optional) – Number of meridians to plot on the globe

  • num_parallels (int, optional) – Number of parallels to plot on the globe

  • coast_res ({'c', 'l', 'i', 'h', 'f'}, optional) – Resolution of coastlines

Returns:

bmap

Return type:

Basemap object