import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection # container for line segments from matplotlib.text import Text, Annotation
import matplotlib.cm as cm # colour mappings
import random