Fixed indent
This commit is contained in:
commit
9f1c871cb4
2
fetch.py
2
fetch.py
@ -3,7 +3,7 @@
|
||||
"""
|
||||
Created on Mon Nov 5 20:55:36 2018
|
||||
|
||||
@author: suwako
|
||||
@author: suwako & thedevkiller
|
||||
"""
|
||||
|
||||
import requests
|
||||
|
37
plotgen.py
Executable file
37
plotgen.py
Executable file
@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import mplleaflet
|
||||
import fetch
|
||||
|
||||
|
||||
def genplot(diclist):
|
||||
for index, area in enumerate(diclist):
|
||||
if index in [210,223]:
|
||||
continue
|
||||
for figure in area['zone']:
|
||||
if figure[0] == 'cercle' :
|
||||
print("cercle")
|
||||
else:
|
||||
print("polygone")
|
||||
xcoords,ycoords=[],[]
|
||||
for xaxis,yaxis in figure:
|
||||
xcoords.append(xaxis)
|
||||
ycoords.append(yaxis)
|
||||
xcoords.append(xcoords[0])
|
||||
ycoords.append(ycoords[0])
|
||||
plt.plot(xcoords,ycoords,'b')
|
||||
plt.plot(xcoords,ycoords,'rs')
|
||||
plt.fill(xcoords,ycoords,'g')
|
||||
return plt
|
||||
|
||||
|
||||
#plt.plot([15,16,17,15],[6,7,18,6],'b')
|
||||
#plt.plot(17,6,'b')
|
||||
#plt.plot(16,7,'rs')
|
||||
#plt.fill([15,16,17,15],[6,7,18,6])
|
||||
#mplleaflet.show()
|
||||
|
||||
if __name__ == '__main__':
|
||||
plt=genplot(fetch.fetch())
|
||||
mplleaflet.show()
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
requests
|
||||
mplleaflet
|
||||
matplotlib
|
Loading…
Reference in New Issue
Block a user