Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

cartopy indicate lat lon

import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import cartopy.crs as ccrs

from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER


ax = plt.axes(projection=ccrs.Mercator())
ax.coastlines()

gl = ax.gridlines(crs=ccrs.PlateCarree(), draw_labels=True,
                  linewidth=2, color='gray', alpha=0.5, linestyle='--')
gl.xlabels_top = False
gl.ylabels_left = False
gl.xlines = False
gl.xlocator = mticker.FixedLocator([-180, -45, 0, 45, 180])
gl.xformatter = LONGITUDE_FORMATTER
gl.yformatter = LATITUDE_FORMATTER
gl.xlabel_style = {'size': 15, 'color': 'gray'}
gl.xlabel_style = {'color': 'red', 'weight': 'bold'}

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: dataframe ggplot rownames order 
Python :: Annotation graphique python 
Python :: linux show output 
Python :: python evenly spaced integers 
Python :: Find meta tag of a website in python 
Python :: Python NumPy squeeze function Syntax 
Python :: Python NumPy atleast_2d Function Example 2 
Python :: Python NumPy ndarray flat function Example 
Python :: Django merge duplicate rows 
Python :: youtube-dl python not found 
Python :: smile detection 
Python :: Python NumPy asscalar Function Example 01 
Python :: Python NumPy array_split Function Example 01 
Python :: Python NumPy append Function Example Working with axis 
Python :: mid-point line drawing 
Python :: Python how to use __div__ 
Python :: NumPy rot90 Example Rotating Three times 
Python :: ignopre rankwarning pyton 
Python :: django disable foreign key checks temporary 
Python :: change admin password djano 
Python :: downgrading to previous migration django 
Python :: Accessing range() with index value 
Python :: python forward declaration 
Python :: send by email in odoo 14 
Python :: python re return index of match 
Python :: corpus.fit(sentences, window=10) 
Python :: Determining the Data Type 
Python :: python regex with f-string 
Python :: ring Insert Items in list 
Python :: list duplicate files between two folders python 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =