1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Python】Basemapメモ

Last updated at Posted at 2020-03-10

現在はcartopyに移行したのでページ分割.

指定したAxesにBasemapを描画するにはBasemap(ax=)

map1 = Basemap(projection='ortho', lon_0 = 0, lat_0 = 40, ax=ax1)

GridSpecsubplot2gridとの連携に便利
https://basemaptutorial.readthedocs.io/en/latest/subplots.html

陸・海の塗りつぶしにはdrawlsmask( land_color=, ocean_color= )

Drawing a Map Background

経緯度線のラベルは[left,right,top,bottom]の順

parallels = np.arange(0.,81,10.)
m.drawparallels(parallels,labels=[False,True,True,False])
meridians = np.arange(10.,351.,20.)
m.drawmeridians(meridians,labels=[True,False,False,True])

下にカラーバーを付けるときはlocation='bottom'

Basemap tutorial: Basemap utility functions

経緯度線のlinestyleはdashesで指定可能だが…

matplotlib.pyplotで言うところの'dotted'の方が近い.
linestyles=':', linewidth=1.0でほぼBasemapの経緯度線と同じ.
https://stackoverflow.com/questions/54663882/setting-the-linestyle-for-the-longitude-and-latitude-lines-in-matplotlibs-basem

Basemapにタイトルを付けるにはplt.title()でOK

Basemaptitleメソッドは存在しないが,plt.title()で問題ない
https://stackoverflow.com/questions/9402151/how-do-i-add-a-title-to-my-matplotlib-basemap

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?