lair.geo.add_latlon_ticks#

lair.geo.add_latlon_ticks(ax, extent, x_rotation=0, labelsize=None, more_lon_ticks=0, more_lat_ticks=0)[source]#

Add latitude and longitude ticks to the map.

Parameters:
  • ax (plt.Axes) – Axes object

  • extent (list[float]) – Extent of the map. [minx, maxx, miny, maxy]

  • x_rotation (int, optional) – Rotation of the longitude labels, by default 0

  • labelsize (int, optional) – Font size of the labels, by default None

  • more_lon_ticks (int, optional) – Number of additional longitude ticks, by default 0

  • more_lat_ticks (int, optional) – Number of additional latitude ticks, by default 0

Returns:

None

Return type:

None

See also

add_lat_ticks

The latitude ticks alone.

add_lon_ticks

The longitude ticks alone.

Examples

Ticks about one per inch, on a map of the Salt Lake Valley (Draw a map of an inventory draws one):

extent = [-112.3, -111.7, 40.4, 41.0]
ax.set_extent(extent, crs=PC)
add_latlon_ticks(ax, extent, x_rotation=45)