geomappy.plot_utils.add_ticks
- geomappy.plot_utils.add_ticks(ax: ~cartopy.mpl.geoaxes.GeoAxes, ticks: float | tuple[float, float] | tuple[tuple[float], tuple[float]], *, formatter: ~matplotlib.ticker.Formatter | tuple[~matplotlib.ticker.Formatter, ~matplotlib.ticker.Formatter] | None = None, fontsize: int = 10, crs: ~cartopy.crs.Projection = <Projected CRS: +proj=eqc +ellps=WGS84 +a=6378137.0 +lon_0=0.0 +to ...> Name: unknown Axis Info [cartesian]: - E[east]: Easting (unknown) - N[north]: Northing (unknown) - h[up]: Ellipsoidal height (metre) Area of Use: - undefined Coordinate Operation: - name: unknown - method: Equidistant Cylindrical Datum: Unknown based on WGS 84 ellipsoid - Ellipsoid: WGS 84 - Prime Meridian: Greenwich , **kwargs) Gridliner
Add tick labels to a map axes and return a Gridliner object for further styling.
- Parameters:
ax (
cartopy.mpl.geoaxes.GeoAxes) – Map axes to add tick labels to.ticks (int, tuple of ints, tuple of tuple of ints) – Interval(s) or positions for ticks in degrees. Single int for both axes, tuple of two ints for separate x and y intervals, or tuple of explicit positions.
formatter (
matplotlib.ticker.Formatter, or tuple of two, optional) – Formatter(s) for x and y tick labels. Default uses LongitudeFormatter and LatitudeFormatter.fontsize (int, optional) – Font size of the tick labels. Default is 10.
crs (
cartopy.crs.Projection, optional) – CRS of the tick positions. Default is PlateCarree.**kwargs – Additional keyword arguments passed to ax.gridlines.
- Returns:
The created Gridliner object.
- Return type:
cartopy.mpl.gridliner.Gridliner