Skip to content

Instantly share code, notes, and snippets.

@tamlt2704
Created May 21, 2018 03:57
Show Gist options
  • Save tamlt2704/bc5d2d1e029d7019099417aad8713d91 to your computer and use it in GitHub Desktop.
Save tamlt2704/bc5d2d1e029d7019099417aad8713d91 to your computer and use it in GitHub Desktop.
fig = plt.figure()
ax = fig.add_subplot(121)
img = plt.imread("SingaporeMap.PNG")
ax.imshow(img, extent=[103.6052, 104.0402, 1.2194, 1.4844])
df2 = bus_route_df[bus_route_df.high_freq == False]
for k, g in df2.groupby('ServiceNo'):
lats = g.sort_values('StopSequence').Latitude.astype(float).values
lons = g.sort_values('StopSequence').Longitude.astype(float).values
ax.plot(lons, lats, 'g.')
# fig.set_size_inches(10, 10)
ax.set_title('low freq services routes (AM_OP >= {} minutes)'.format(bus_freq_threshold))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment