Pythonで世界地図-8（最近の火山噴火）

2018/06/04にグアテマラ火山の噴火があり、最近の火山噴火をググってみました。
太平洋附近の噴火のニュースしか見つかりませんでした。

プレートと火山噴火の地図を重ねて見ると、ほとんどがプレートが潜り込んでいる所で噴火しています。（ハワイを除く）

あまり、ニュースにならないが何か心配になってきた。

火山噴火1.csv

```shell-session
latitude,longitude,name,scale
29.642,129.715,諏訪之瀬島 御岳(2013/08以降頻繁に噴火),3
-15.391,167.818,Vanuatu Ambae(2017/09以降),3
31.911,130.883,新燃岳(2017/10/31頃から頻繁に噴火),3
19.023,261.373,Popocatepetl(2017/11/10以降頻繁に噴火),8
-3.607,144.588,Papua New Guinea-Kadovar(2018/01/05),3
36.623,138.532,本白根山(2018/01/23),3
13.255,123.686,Mayon(2018/01/23),8
3.169,98.393,Gunung Sinabung(2018/02/19),8
31.947,130.853,硫黄山(2018/04/20),3
56.057,160.641,Ключевская Сопка(2018/04/25),6
31.581,130.656,桜島 南岳(2018/04/26),3
-7.541,110.446,Merapi(2018/04/27),3
19.407,204.716,Kilauea(2018/05/03),8
14.474,269.118,Fuego(2018/06/04),8
```

```python:
#!/usr/bin/python3
# coding: UTF-8

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
import csv

filename = '火山噴火1.csv'
font = {'family':'IPAGothic'} #日本語Fontを指定

lats, lons, name1, scale = [], [], [], []

with open(filename) as f:
    reader = csv.reader(f)

    next(reader)

    for row in reader:
        lats.append(float(row[0]))  #latitude
        lons.append(float(row[1]))  #longitude
        name1.append(row[2])   #火山 name
        scale.append(int(row[3]))   #噴火規模

map = Basemap(projection='cyl', lat_0=0, lon_0=150,resolution='l', area_thresh=1000.0)

map.drawcoastlines()
map.drawcountries()
map.fillcontinents(color='gray')
map.drawmapboundary()
plt.title('最近の火山噴火', **font,fontsize=15)

map.drawmeridians(np.arange(0, 360, 10),labels=[True,False,False,True])
map.drawparallels(np.arange(-90, 90, 10),labels=[False,True,True,False])

x,y = map(lons, lats)

for i in range(len(name1)): 
    map.plot(x[i], y[i], 'r^', markersize=scale[i])
    plt.text(x[i], y[i], " " + name1[i], fontsize=12, color='red', **font)

#フィリピン海プレート
x1 = [141.93,138.62,138.42,136.66,132.82,130.64,126.1,122.82,121.69,121.38,120.59,121.19,119.5,121.48,124.07,126.01,127.48,129.33,132.39,134.03,137.43,139.09,147.15,147.89,143.54,141.93]
y1 = [34.28,35.26,34,32.98,30.94,27.98,23.63,23.21,24.74,24.47,22.41,19.86,17.11,15.34,15.34,12.12,5.71,1.46,0,5.74,7.79,11.03,13.98,19.05,24.47,34.28]
plt.plot(x1,y1,linewidth=0.5,color='red')

#太平洋プレート
x2 = [141.933,143.805,144.481,154.978,164.124,172.207,180.587,190.411,203.463,215.496,222.943,227.298,234.994,235.186,239.293,246.645,249.731,253.681,258.541,247.714,249.735,251.698,231.094,213.798,185.915,157.716,159.658,166.646,170.82,177.632,184.277,187.741,173.622,166.898,162.361,160.818,154.528,152.374,148.317,145.548,138.421,132.39]
y2 = [34.284,37.713,41.028,46.628,55.17,51.838,50.496,51.421,54.465,59.56,57.701,52.876,47.046,40.381,34.885,31.173,26.115,21.419,1.826,-25.161,-33.999,-59.355,-59.535,-65.877,-67.386,-58.275,-52.985,-44.723,-42.559,-41.008,-28.24,-15.107,-11.744,-8.195,-9.479,-7.687,-6.623,-5.54,-6.599,-4.138,-1.175,0.004]
plt.plot(x2,y2,linewidth=0.5,color='red')

#ユーラシアプレート
x3 = [138.622,138.442,137.928,137.835,137.847,137.39,139.926,142.967,142.533,142.809,142.779,144.397,140.314,133.443,118.419,-7.082,7.257,-6.602,-22.006,-35.222,-30.101,-27.355,-29.628,-5.969,17.96,24.899,34.96,37.104,41.84,60.972,64.46,72.201,85.398,96.026,91.303,93.79,91.577,94.795,103.33,121.588,131.31,133.526,129.551,129.329]
y3 = [35.263,35.699,36.151,36.501,37.03,39.491,45.667,48.769,51.47,54.013,59.282,63.937,68.125,72.712,82.557,83.346,73.709,70.946,63.946,53.204,52.158,47.109,37.974,36.003,38.899,34.232,36.219,37.46,37.579,25.519,25.661,34.377,28.006,27.863,22.125,16.261,10.015,2.839,-7.138,-11.386,-8.356,-5.386,-2.362,1.461]
plt.plot(x3,y3,linewidth=0.5,color='red')

#オーストラリアプレート
x4 = [157.716,153.686,139.674,126.595,98.98,78.298,70.066,66.547,68.382,66.336,57.161,62.078,64.46]
y4 = [-58.275,-61.069,-50.281,-48.96,-47.711,-38.843,-25.459,-22.548,-5.218,2.599,10.527,21.485,25.661]
plt.plot(x4,y4,linewidth=0.5,color='red')

#アラビアプレート
x5 = [57.161,55.808,42.189,41.787,38.326,34.334,34.535,34.96]
y5 = [10.527,14.829,11.874,15.552,20.411,27.541,32.093,36.219]
plt.plot(x5,y5,linewidth=0.5,color='red')

#北アメリカプレート
x6 = [253.681,255.485,262.979,273.314,278.57,281.578,286.342,295.646,296.192,313.355,313.451,330.372]
y6 = [21.419,	18.435,		15.423,		10.476,	7.116,	7.079,	12.897,	11.938,	17.46,	18.6,	24.462,	37.974]
plt.plot(x6,y6,linewidth=0.5,color='red')

#ナスカプレート
x7 = [258.541,275.555,278.57,281.578,281.903,278.819,278.18,283.542,288.629,287.247,284.257,277.987,275.604,268.603,268.22,249.735]
y7 = [1.826,-1.456,7.116,7.079,4.809,-0.45,-5.354,-15.065,-19.689,-32.916,-45.987,-44.628,-41.498,-40.854,-38.714,-33.999]
plt.plot(x7,y7,linewidth=0.5,color='red')

#南アメリカプレート1
x8 = [284.257,283.006,284.274,292.597,295.09,311.98,324.095]
y8 = [-45.987,-49.396,-53.875,-56.824,-55.456,-53.362,-55.592]
plt.plot(x8,y8,linewidth=0.5,color='red')

#南アメリカプレート2
x8_2 = [-26.825,-23.99,-26.274,-19.462,-16.72,-7.698,-1.001,-15.758,-17.796,-13.23,-12.229,-13.326,-11.582,-13.043,-15.917,-16.559,-24.612,-25.317,-30.199]
y8_2 = [-55.334,-59.316,-60.583,-60.741,-58.645,-57.772,-55.086,-44.611,-35.824,-28.848,-19.526,-7.531,-6.524,-0.887,-1.399,0.16,-1.019,0.839,0.807]
plt.plot(x8_2,y8_2,linewidth=0.5,color='red')

#南アメリカプレート3
x8_3 = [325.197,316.605,313.458,313.355]
y8_3 = [7.305,10.941,15.596,18.6]
plt.plot(x8_3,y8_3,linewidth=0.5,color='red')

#アフリカプレート
x9 = [-1.001,14.198,25.686,32.745,46.044,57.106,70.066]
y9 = [-55.086,-52.311,-53.652,-47.232,-38.96,-32.788,-25.459]
plt.plot(x9,y9,linewidth=0.5,color='red')

plt.show()
```
地図の種類を変更すると、東経の値がマイナスだとドット・テキストの表示が消えてしまいました。

plt.plot()は、表示する東経によって、東経がマイナスでなければ行けなかったり、プラスでなければいけなかったりします。

![image.png](https://qiita-image-store.s3.amazonaws.com/0/238800/5e1041fb-ecfb-b759-77cb-01705f38927a.png)

#####各プレートの移動方向の矢印を追加

```python:
x_b_1,y_b_1 = map(190,10)
plt.quiver(x_b_1,y_b_1,-0.25,0.2,color='red',headlength=2.5,headaxislength=2.25,width=0.005)  #太平洋プレートの移動方向

x_b_2,y_b_2 = map(148,20)
plt.quiver(x_b_2,y_b_2,-0.25,0.1,color='red',headlength=2.5,headaxislength=2.25,width=0.005)  #フィリピン海プレートの移動方向

x_b_3,y_b_3 = map(255,-5)
plt.quiver(x_b_3,y_b_3,0.2,0.3,color='red',headlength=2.5,headaxislength=2.25,width=0.005)  #ナスカプレートの移動方向

x_b_4,y_b_4 = map(85,-25)
plt.quiver(x_b_4,y_b_4,0.2,0.2,color='red',headlength=2.5,headaxislength=2.25,width=0.005)  #オーストラリアプレートの移動方向

plt.show()  #この行は追加不要
```

![image.png](https://qiita-image-store.s3.amazonaws.com/0/238800/16a1e17d-a735-8b3c-2a81-e6f4ca169299.png)