PSK ReporterとCartopyパッケージ

Cartopyは、地理空間情報を処理して地図を生成するなどのデータ解析を行うためのPythonのパッケージです。

Basemapは、Cartopyプロジェクトに置き換えられます。新規のソフトウェア開発は、可能な限りCartopyを用いるべきです。

import cartopy.crs as ccrs
import matplotlib.pyplot as plt
import numpy as np

ax = plt.axes(projection=ccrs.PlateCarree())
ax.stock_img()

n=50
x = 360.0 * np.random.rand(n) - 180.0
y = 120.0 * np.random.rand(n) -  60.0
r =  50.0 * np.random.rand(n) +  20.0

plt.scatter(x, y, c=x, s=r, cmap='hsv', alpha=0.75)
plt.show()

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.