Resize iss image

release-1.0.0
DustyP 8 years ago
parent 7fa35bf478
commit 3d7e32b2d1

@ -539,12 +539,13 @@ class Utils:
def gen_image(iss_loc): def gen_image(iss_loc):
lat = iss_loc['latitude'] lat = iss_loc['latitude']
lon = iss_loc['longitude'] lon = iss_loc['longitude']
plt.figure(figsize=(8, 8)) plt.figure(figsize=(5, 5))
m = Basemap(projection='ortho', resolution=None, lat_0=lat, lon_0=lon) m = Basemap(projection='ortho', resolution=None, lat_0=lat, lon_0=lon)
m.bluemarble(scale=0.5) m.bluemarble(scale=0.5)
x, y = m(lon, lat) x, y = m(lon, lat)
plt.plot(x, y, 'ok', markersize=10, color='red') plt.plot(x, y, 'ok', markersize=10, color='red')
plt.text(x, y, ' ISS', fontsize=20, color='red') plt.text(x, y, ' ISS', fontsize=20, color='red')
plt.tight_layout()
img = BytesIO() img = BytesIO()
plt.savefig(img, format='png', transparent=True) plt.savefig(img, format='png', transparent=True)

Loading…
Cancel
Save