syrte
6/16/2017 - 4:26 PM

tripcolorshow.py

def tripcolorshow(x, y, z=None, **kwargs):
    """
    tripcolorshow(x, y, z)
    
    tri = Triangulation(x, y)
    tripcolorshow(tri, z)
    """
    import matplotlib.tri as tri
    import matplotlib.pyplot as plt

    if z is not None:
        triang, c = tri.Triangulation(x, y), z
    else:
        triang, c = x, y
    return plt.tripcolor(triang, c, **kwargs)