A tool to add basemap in matplotlib
Project description
plot_map
plot_map是一个基于matplotlib的工具,在用geopandas或者pyplot绘制地理图形的时候,你可以用plot_map来添加地图底图
When you want to plot geo object using python geopandas or matplotlib.pyplot, you can use this module to generate map backgroud.
只需要用以下代码:
Just use the following code:
plot_map(plt,bounds,zoom = 9,style = 1)
你可以通过改变参数"style"和"styleid"来改变底图的风格样式
You can change your map style by changing the "style" and "styleid" in the function plot_map
bounds -- Set your plotting boundary [lon1,lat1,lon2,lat2] (wgs1984)
zoom -- The zoom level of the map
style -- From 1 to 7 represent different map styles,1-6 is from openstreetmap and 7 is the mapbox
styleid -- if style is set as 7(from mapbox), you can change the styleid here, "dark" or "light" or your own style
imgsavepath -- Path to save the tile map so that you don't have to download again
printlog -- Show the log
更新 Update
2020.3.35
增加绘制指北针和比例尺的功能plotscale(ax) add the function plotscale, now you can plot the compass and scale on the map!
2020.3.24
可将下载的地图保存,下次使用时直接读取!
set the imgsavepath to save the tile map
imgsavepath -- Path to save the tile map so that you don't have to download again
2020.3.22
绘图过程增加了timeout为6s,尝试次数10次,妈妈再也不用担心plot_map画图卡很久
add 6s timeout and maximun try 10 times
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file plot_map-0.1.3.tar.gz
.
File metadata
- Download URL: plot_map-0.1.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e75357371ee7c56990c184876c8a0c5712b4f71f22349707ad3bff9693afa09 |
|
MD5 | 22082b3ba055780c43febf92603df425 |
|
BLAKE2b-256 | 0bd159980ed493492192874788a9bb7742b85423979f30d98c87fb3109fe9d37 |