日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

Python之gmplot:gmplot库的简介、安装、使用方法之详细攻略

發布時間:2025/3/21 python 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Python之gmplot:gmplot库的简介、安装、使用方法之详细攻略 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Python之gmplot:gmplot庫的簡介、安裝、使用方法之詳細攻略

?

?

?

目錄

gmplot庫的簡介

gmplot庫的安裝

gmplot庫的使用方法

1、基礎用法


?

?

?

?

gmplot庫的簡介

? ? ? ? ?一個類似matplotlib的接口,可以在谷歌地圖上渲染你想要的所有數據。有幾種繪圖方法可以輕松地創建探索性地圖視圖。

文檔:https://github.com/gmplot/gmplot/wiki

?

?

gmplot庫的安裝

pip install gmplot

?

?

gmplot庫的使用方法

1、基礎用法

import gmplot# Create the map plotter: apikey = '' # (your API key here) gmap = gmplot.GoogleMapPlotter(37.766956, -122.448481, 14, apikey=apikey)# Outline the Golden Gate Park: golden_gate_park = zip(*[(37.771269, -122.511015),(37.773495, -122.464830),(37.774797, -122.454538),(37.771988, -122.454018),(37.773646, -122.440979),(37.772742, -122.440797),(37.771096, -122.453889),(37.768669, -122.453518),(37.766227, -122.460213),(37.764028, -122.510347) ]) gmap.polygon(*golden_gate_park, color='cornflowerblue', edge_width=10)# Highlight some attractions: attractions_lats, attractions_lngs = zip(*[(37.769901, -122.498331),(37.768645, -122.475328),(37.771478, -122.468677),(37.769867, -122.466102),(37.767187, -122.467496),(37.770104, -122.470436) ]) gmap.scatter(attractions_lats, attractions_lngs, color='#3B0B39', size=40, marker=False)# Mark a hidden gem: gmap.marker(37.770776, -122.461689, color='cornflowerblue')# Draw the map: gmap.draw('map.html')

?

?

?

?

?

?

?

?

?

總結

以上是生活随笔為你收集整理的Python之gmplot:gmplot库的简介、安装、使用方法之详细攻略的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。