python basemap 畫出經緯度并標定的實例
更新時間:2019年07月09日 11:23:01 投稿:jingxian
今天小編就為大家分享一篇python basemap 畫出經緯度并標定的實例,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
如下所示:
兩個函數(shù):Basemap.drawparallels ##緯度
Basemap.drawmeridians ##經度
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
# setup Lambert Conformal basemap.
m = Basemap(width=12000000,height=9000000,projection='lcc',
resolution='c',lat_1=45.,lat_2=55,lat_0=50,lon_0=-107.)
# draw coastlines.
m.drawcoastlines()
# draw a boundary around the map, fill the background.
# this background will end up being the ocean color, since
# the continents will be drawn on top.
m.drawmapboundary(fill_color='aqua')
# fill continents, set lake color same as ocean color.
m.fillcontinents(color='coral',lake_color='aqua')
# draw parallels and meridians.
# label parallels on right and top
# meridians on bottom and left
parallels = np.arange(0.,81,10.)
# labels = [left,right,top,bottom]
m.drawparallels(parallels,labels=[False,True,True,False])
meridians = np.arange(10.,351.,20.)
m.drawmeridians(meridians,labels=[True,False,False,True])
plt.show()
以上這篇python basemap 畫出經緯度并標定的實例就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關文章
Python字符串中出現(xiàn)的次數(shù)統(tǒng)計多種方法
這篇文章主要介紹了Python字符串中出現(xiàn)的次數(shù)統(tǒng)計多種方法,使用內置的count()方法、正則表達式、列表推導式、循環(huán)和條件判斷以及字符串分割,每種方法都有其適用的場景和優(yōu)缺點,選擇合適的方法取決于具體的需求和場景,需要的朋友可以參考下2024-12-12
Python基于similarities實現(xiàn)文本語義相似度計算和文本匹配搜索
similarities?實現(xiàn)了多種相似度計算、匹配搜索算法,支持文本、圖像,python3開發(fā),下面我們就來看看如何使用similarities實現(xiàn)文本語義相似度計算和文本匹配搜索吧2024-03-03
Python中創(chuàng)建相關系數(shù)矩陣的方法小結
相關系數(shù)矩陣是一種用于衡量變量之間關系的重要工具,本文將介紹在 Python 中創(chuàng)建相關系數(shù)矩陣的不同方法,感興趣的小伙伴可以跟隨小編一起學習一下2023-12-12
Python3實現(xiàn)統(tǒng)計單詞表中每個字母出現(xiàn)頻率的方法示例
這篇文章主要介紹了Python3實現(xiàn)統(tǒng)計單詞表中每個字母出現(xiàn)頻率的方法,涉及Python針對文件的讀取、遍歷、統(tǒng)計等相關操作技巧,需要的朋友可以參考下2019-01-01
Python中Yield的基本用法及Yield與return的區(qū)別解析
Python中有一個非常有用的語法叫做生成器,用到的關鍵字就是yield,這篇文章主要介紹了Python中Yield的基本用法及Yield與return的區(qū)別,需要的朋友可以參考下2022-10-10
python的virtualenv虛擬環(huán)境常見問題和命令
在Python中,venv是一個用于創(chuàng)建和管理虛擬環(huán)境的模塊,虛擬環(huán)境可以幫助你在項目之間隔離不同的Python包和依賴關系,這篇文章主要介紹了python的virtualenv虛擬環(huán)境常見問題和命令,需要的朋友可以參考下2024-07-07

