From 3d7e32b2d1eb682b571e5da006698bdbcfb9bd22 Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Thu, 3 May 2018 12:44:11 -0800 Subject: [PATCH] Resize iss image --- exts/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exts/utils.py b/exts/utils.py index 2f70927..95ace08 100644 --- a/exts/utils.py +++ b/exts/utils.py @@ -539,12 +539,13 @@ class Utils: def gen_image(iss_loc): lat = iss_loc['latitude'] 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.bluemarble(scale=0.5) x, y = m(lon, lat) plt.plot(x, y, 'ok', markersize=10, color='red') plt.text(x, y, ' ISS', fontsize=20, color='red') + plt.tight_layout() img = BytesIO() plt.savefig(img, format='png', transparent=True)