我正在使用folium
在基于lon,lat和point类别的地图上生成一些交互式点图。数据如下:
import numpy as np
lon = [114.29624076258888, 113.86998761946636, 113.83032837559338, 113.83115088801523, 113.85000107501983, 114.29659306108981, 113.86958065788812, 113.85015956902443, 113.86958254490524, 113.97699541631864]
lat = [22.58408697498237, 22.52219597795792, 22.557517003664284, 22.521435521935352, 22.53976105107369, 22.566039329139038, 22.540236842195373, 22.53985744592709, 22.540237988242605, 22.51521882442377]
c = np.random.randint(0, 3, len(lon))
我现在可以使用以下代码在地图上绘制点标记:
import folium
map_osm = folium.Map(location=[22.534003, 113.962764])
for point in zip(lat, lon):
folium.Marker(location = [point[0], point[1]]).add_to(map_osm)
map_osm.save('test.html')
但是,我不知道该怎么做
设置点的颜色及其类别。
将点形状更改为圆形,并将透明度(alpha)设置为0.5。
有人可以帮我吗?