-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplot-testing.py
More file actions
20 lines (17 loc) · 7.85 KB
/
Copy pathplot-testing.py
File metadata and controls
20 lines (17 loc) · 7.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import matplotlib.pyplot as plt
lat_values = [51.0794517066, 51.07945158722, 51.07945075209, 51.07945018325, 51.07945057295, 51.07944908476, 51.0794481073, 51.07944394497, 51.07943846377, 51.0794340649, 51.07942950945, 51.07942490249, 51.07941948994, 51.07941367737, 51.07940894578, 51.07940300687, 51.07939740603, 51.07939083819, 51.07938659759, 51.07938144402, 51.07937468119, 51.07936762713, 51.07936177468, 51.07935466079, 51.07934733545, 51.07934112707, 51.07933014524, 51.0793282104, 51.079314011, 51.07930941643, 51.07929882281, 51.07929130268, 51.07927748617, 51.07927757052, 51.07925946892, 51.07924881848, 51.07923988214, 51.07922112525, 51.07921220064, 51.07920377321, 51.07919591499, 51.07917687738, 51.0791662425, 51.07916767886, 51.07915906514, 51.07915015914, 51.07914567686, 51.07913384896, 51.07912519949, 51.07911643073, 51.0791076445, 51.07909951852, 51.07909133109, 51.07907951713, 51.0790757965, 51.07906034186, 51.07905208345, 51.07904311641, 51.07902682086, 51.07901257384, 51.07900263624, 51.07899171443, 51.07898463872, 51.0789681955, 51.07896365808, 51.07895867578, 51.07895739906, 51.07895152694, 51.07893738252, 51.07892681731, 51.07891863965, 51.07890807278, 51.07890271547, 51.0788872112, 51.07887835121, 51.07887146031, 51.07886102358, 51.07885455047, 51.07884425316, 51.07883628998, 51.07883235348, 51.07882272581, 51.07881605965, 51.0788064021, 51.07879516123, 51.07878904723, 51.07878975992, 51.07877856598, 51.07877122667, 51.07876715305, 51.07875703687, 51.07877243756, 51.07876606179, 51.07876607388, 51.07877029888, 51.07876554216, 51.07875936505, 51.07878701595, 51.07878596361, 51.07878179113, 51.07876458875, 51.07877364511, 51.07879026022, 51.07877091177, 51.078778806, 51.07878986019, 51.07878886178, 51.07880303451, 51.07879641644, 51.07880345952, 51.0788559787, 51.07883846195, 51.07885965852, 51.07882709593, 51.07883729416, 51.07882440094, 51.07882843051, 51.07885163958, 51.0788844092, 51.07885015995, 51.07886761848, 51.07886640333, 51.07887520408, 51.07887189907, 51.07889009173, 51.07887637504, 51.07888094002, 51.07890949302, 51.07891585805, 51.07891142771, 51.0788954851, 51.07891155405, 51.07894666018, 51.07890146405, 51.0789091443, 51.07895300463, 51.07898805525, 51.07895864854, 51.07897004595, 51.07899489916, 51.07900629272, 51.07903682204, 51.07906678178, 51.07908145607, 51.07909848175, 51.07908900205, 51.07909759202, 51.07910884298, 51.07909329479, 51.07910204103, 51.0791121316, 51.07911873541, 51.07912989188, 51.07913711299, 51.07914653134, 51.07915270969, 51.07916123641, 51.07917143578, 51.07917831399, 51.07918305008, 51.07919039323, 51.07920589323, 51.07921494691, 51.07922506298, 51.07923489292, 51.07924272603, 51.07924997723, 51.07925790686, 51.07926619228, 51.07927429146, 51.07928273556, 51.07929080386, 51.079297148, 51.07930419539, 51.07931132822, 51.07931788329, 51.07932317083, 51.0793299247, 51.07933386955, 51.07933782113, 51.07934302443, 51.07934834493, 51.07934814181, 51.07934419363, 51.07934448247, 51.0793377754, 51.07933100095, 51.07932375592, 51.07931637069, 51.07930563259, 51.07930234672, 51.07929518002, 51.07928353639, 51.07928209077, 51.07928123379, 51.07929137375, 51.0792900913, 51.07928799037, 51.07929507926, 51.07929165878, 51.0792919838, 51.07931246919, 51.07931716869, 51.07931070998, 51.07930624101, 51.07931125794, 51.07930073795, 51.07930387583, 51.07930492338, 51.07928549506, 51.07928207236, 51.0792837835, 51.07929799598, 51.07931673878, 51.07934169176, 51.07932230615, 51.07929374309, 51.07929370349, 51.07929700221]
long_values = [-114.13146177579, -114.13146198041, -114.13146178381, -114.13146209173, -114.13146264054, -114.13146202385, -114.13147042349, -114.13148638943, -114.13149909497, -114.13151612934, -114.13153236852, -114.13154854663, -114.13156211078, -114.13157048337, -114.13159461573, -114.13160213331, -114.13162103127, -114.13163984144, -114.13165135643, -114.13166154256, -114.13168047209, -114.13169540535, -114.13168475385, -114.13168873153, -114.13171018922, -114.13174754668, -114.13176198553, -114.13179308522, -114.13180125294, -114.13180994918, -114.13182231264, -114.1318298191, -114.13183906159, -114.13187032535, -114.13186736231, -114.13187449432, -114.13188976575, -114.1318807676, -114.13189052771, -114.13190405564, -114.13193235049, -114.1319174048, -114.13191912892, -114.1319319, -114.13193684259, -114.13193774033, -114.13194736226, -114.13193043454, -114.13191969211, -114.13190367157, -114.13189327883, -114.13187793585, -114.13187012163, -114.13185700888, -114.13184723525, -114.13183558033, -114.13182244724, -114.13182220743, -114.13181194983, -114.13181862724, -114.13180257926, -114.13179733548, -114.13178758679, -114.13179444075, -114.13176793453, -114.13174628252, -114.13172066384, -114.13170416766, -114.1317037564, -114.13169701057, -114.13168467572, -114.13167287173, -114.13166789272, -114.13164757224, -114.13163606246, -114.13162283988, -114.13161490799, -114.13159924212, -114.13158730257, -114.13157309104, -114.13156223584, -114.13154730613, -114.13153461564, -114.13152255811, -114.13151870788, -114.13150229734, -114.1314753335, -114.13147540624, -114.13145301091, -114.13143179181, -114.13142169912, -114.13139737072, -114.13137876473, -114.13140613235, -114.13134522947, -114.13136042531, -114.1313040847, -114.13130788977, -114.13128328405, -114.13126883855, -114.13123685496, -114.13122612279, -114.13120876165, -114.1311808286, -114.1311632393, -114.13114916451, -114.13113464053, -114.131119825, -114.13109976432, -114.13108523265, -114.13109719911, -114.13108242993, -114.13106653214, -114.13102354614, -114.13101637573, -114.13097929399, -114.13094241063, -114.13097252532, -114.1309739092, -114.13092680689, -114.13092089213, -114.13090124844, -114.130889079, -114.13087531195, -114.13088991582, -114.13084865253, -114.13083146807, -114.13083492737, -114.13080940582, -114.13077760822, -114.13073437984, -114.13072970026, -114.13074563661, -114.13066271669, -114.13065186615, -114.13069284227, -114.1307334619, -114.13065521845, -114.13064942478, -114.13066706427, -114.13065395863, -114.13068837297, -114.13071321102, -114.13070363576, -114.13070975121, -114.13067310907, -114.13066338453, -114.13064660394, -114.13059894727, -114.13058830364, -114.1305747908, -114.13055859262, -114.13054737318, -114.13053783819, -114.13052316326, -114.13051346279, -114.13050520532, -114.13049705549, -114.13048441871, -114.1304800521, -114.13047133142, -114.13047050051, -114.13048239784, -114.13049491138, -114.13050055852, -114.13051327914, -114.13052308086, -114.13053726656, -114.13055011675, -114.13056540014, -114.13058021407, -114.13059482945, -114.13060815715, -114.13062004338, -114.13063247537, -114.13064496629, -114.1306569064, -114.1306718864, -114.13068570376, -114.13069947568, -114.13071372435, -114.13072845202, -114.13074562075, -114.13076113444, -114.13080156067, -114.13081557673, -114.13082884447, -114.13084096017, -114.13085367507, -114.13084912363, -114.13086998439, -114.13087797025, -114.13089991056, -114.13090965525, -114.13094219011, -114.13096660809, -114.1309689064, -114.13099944617, -114.13095216187, -114.13094263874, -114.13093848984, -114.13092830051, -114.13090250463, -114.13091766846, -114.13092192858, -114.13088206733, -114.13086792851, -114.13084682797, -114.13084354439, -114.13084660492, -114.13084311763, -114.13084480182, -114.13087948042, -114.1308905392, -114.13088362278, -114.13091060368, -114.13087834166, -114.1308804242, -114.13087482956]
def plot_position(data):
""" Plots given data as longitude as a function of latitude
Parameters: data (a dictionary containing latitude and longitude data, with each key representing a time in seconds)
Returns: nothing
"""
img = plt.imread("mapv1.jpg")
fig, ax = plt.subplots()
ax.imshow(img, extent = [-114.1320, -114.1304, 51.0787, 51.0795])
ax.plot(long_values, lat_values, marker = '.', ls = '--')
plt.title("DATA COLLECTED")
plt.xlabel("LONGITUDE")
plt.ylabel("LATITUDE")
plt.show()
plot_position(test_data)