DegreeLocator

class DegreeLocator(*args, **kwargs)[source]

Bases: matplotlib.ticker.MaxNLocator

A locator for longitude and latitude gridlines. Adapted from cartopy.

Parameters

dms (bool, optional) – Locate the ticks on clean degree-minute-second intervals and format the ticks with minutes and seconds instead of decimals. Default is False.

Attributes Summary

default_params

Methods Summary

bin_boundaries(vmin, vmax)

set_params(**kwargs)

Set parameters for this locator.

Attributes Documentation

default_params = {'dms': False, 'integer': False, 'min_n_ticks': 2, 'nbins': 8, 'prune': None, 'steps': None, 'symmetric': False}

Methods Documentation

bin_boundaries(vmin, vmax)[source]
set_params(**kwargs)[source]

Set parameters for this locator.

Parameters
  • nbins (int or 'auto', optional) – see MaxNLocator

  • steps (array-like, optional) – see MaxNLocator

  • integer (bool, optional) – see MaxNLocator

  • symmetric (bool, optional) – see MaxNLocator

  • prune ({'lower', 'upper', 'both', None}, optional) – see MaxNLocator

  • min_n_ticks (int, optional) – see MaxNLocator