Use D3's built in median function
Add a bounds function, add base vertices to the graph by default
Remove dead code, reorder setting the scale, add base vertices to the graph by default