The other day I saw this tweet:

And then had the idea to make a couple as a birthday gift for my Dad. So I installed Colin Carroll's awesome RidgeMap tool, went over to boxfinder, worked a bit to get the fonts right and ended up with this:

In [16]:
from ridge_map import RidgeMap
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.font_manager as fm
from ridge_map import FontManager

bgcolor = np.array([65,74,76])/255.

scipp = (-92.64240320507457, 34.72628112833569)
rm = RidgeMap((scipp[0]-0.022,scipp[1]-0.009,
               scipp[0]+0.016,scipp[1]+0.019)) #looked good, but seemed to miss dam

scipp_coords = ((scipp[0] - rm.longs[0])/(rm.longs[1] - rm.longs[0]),(scipp[1] - rm.lats[0])/(rm.lats[1] - rm.lats[0]))

prop = fm.FontProperties(fname= rm.font.get_file())


values = rm.get_elevation_data(num_lines=150)
ridges = rm.plot_map(values=rm.preprocess(values=values, lake_flatness=0, water_ntile=15, vertical_ratio=50),
            label='Lake Norrel',
            label_x=0.75,
            label_y=0.025,
            label_size=90,
            kind='elevation',
            background_color=bgcolor,
            line_color = plt.get_cmap('cool'),
            size_scale=50)

[c for c in ridges.get_children() if isinstance(c, matplotlib.text.Text) and 'Lake Norrel' in c._text][0].set_color('white')
ridges.text(scipp_coords[0]-0.055, scipp_coords[1]-0.035, 'Cranmer\'s', fontproperties=prop, size=40, color="white", transform=ridges.transAxes, verticalalignment="bottom", zorder=len(values)+10)
ridges.add_patch(plt.Circle(scipp_coords, 0.0025, color="white", fill=True, transform=ridges.transAxes, zorder=len(values)+10))
ridges.get_figure().savefig('lake_norrel.pdf', bbox_inches='tight')

Here's the area in google maps



Comments

comments powered by Disqus