Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def tripcolor(triang, z):
rgb = get_srgb1(z)
# https://github.com/matplotlib/matplotlib/issues/10265#issuecomment-358684592
n = z.shape[0]
z2 = numpy.arange(n)
cmap = matplotlib.colors.LinearSegmentedColormap.from_list("mymap", rgb, N=n)
plt.tripcolor(triang, z2, shading="gouraud", cmap=cmap)
return