def get_triangle(x, y, z, c, s):
    """Draws a triangle with center (x, y), color c, size s and z-order of z."""
    points = np.array([[0, 0], [s, s*math.sqrt(3.0)], [s*2.0, 0]])
    tri = plt.Polygon(points + [x-s, y-s], fc=c, zorder=z)
    return tri
Draws a triangle with center (x, y), color c, size s and z-order of z.
tensor2tensor/data_generators/video_generated.py