Functions for plotting 2d patches.