from PIL import Image from PIL import ImageDraw # open basemap image file basemap = Image.open(basemap_path).convert('RGBA) # resize to desired map size basemap.thumbnail(width, height, Image.LANCZOS) # get proportional height width_bmp, height_bmp = basemap.size # create background frame and paste basemap on it img=Image.new('RGB',(width, height), color = '#000000') img.paste(basemap, (0,0), basemap) draw = ImageDraw.Draw(img, 'RGBA') width_scale = width/360 height_scale = height_bmp/180 # usgs data has been parsed into a list for quake in earthquake_list: lon = float(quake["longitude"]) lat = float(quake["latitude"]) mag = float(quake["mag"]) # want to use pyproj to translate coordinates here instead of the following cx = (lon + 180) * width_scale cy = (90-lat) * height_scale r = scaleRadius(mag) # draw earthquake circles draw.ellipse((cx-r, cy-r, cx+r, cy+r), fill = colormap(mag)) draw = ImageDraw.Draw(img) img.save(filepath, quality=100) And here is the resulting drawing. I'm assuming the centerpoints for the circles marking earthquakes are off, because I am using Cartesian coordinates for lon, lat, but the basemap was created with a projection and thus must have a distortion from x, y Cartesian coordinates.

