ax.set_frame_on(False)
ax.plot([basis[_, 0] for _ in list(range(sides)) + [0]], [basis[_, 1] for _ in 
    list(range(sides)) + [0]], **edge_args)
return newdata, ax
if __name__ == '__main__':
    k = 0.5
s = 1000
data = vstack((array([k, 0, 0]) + rand(s, 3), array([0, k, 0]) + rand(s, 3),
    array([0, 0, k]) + rand(s, 3)))
color = array([[1, 0, 0]] * s + [[0, 1, 0]] * s + [[0, 0, 1]] * s)
newdata, ax = ternaryPlot(data)
ax.scatter(newdata[:, (0)], newdata[:, (1)], s=2, alpha=0.5, color=color)
show()
Library/tool for drawing ternary/triangle plots