Skip to content

Instantly share code, notes, and snippets.

@kh90909
kh90909 / pyvisgraph_example.py
Created July 13, 2018 22:44
Illustration of pyvisgraph on a pixelated map
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import numpy as np
import PIL
import PIL.ImageDraw
import pyvisgraph as vg
polys = [[vg.Point(3.0,2.0), vg.Point(6.0,2.0), vg.Point(6.0,7.0), vg.Point(3.0,7.0)]]
g = vg.VisGraph()
g.build(polys)