Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- from mpl_toolkits.basemap import Basemap
- import matplotlib.pyplot as plt
- import numpy as np
- map = Basemap(projection='merc', lat_0 = 52, lon_0 = 19,
- resolution = 'h', area_thresh = 150,
- llcrnrlon=13.5, llcrnrlat=49,
- urcrnrlon=24.5, urcrnrlat=55)
- szerokosci = [51.3716666666667,52.3977777777778,52.0688888888889,50.6563888888889]
- dlugosci = [18.4352777777778,20.3091666666667,19.4794444444444,21.4527777777778]
- etykiety = ["Lututów","Czerwińsk n. Wisłą","Piątek","Klimontów"]
- x,y = map(dlugosci, szerokosci)
- map.plot(x, y, 'o', markersize=4, color='red')
- for etykieta, xpt, ypt in zip(etykiety, x, y):
- plt.text(xpt-80000, ypt+22000, etykieta,family='serif', size='8')
- map.drawcoastlines()
- map.drawcountries(linestyle='dashed')
- map.fillcontinents(color = 'wheat')
- map.drawmapboundary(fill_color='royalblue')
- plt.title("Miejscowości, które odzyskały prawa miejskie w 2020 r.")
- plt.savefig('mapka4miast.jpg', dpi=600)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement