title=r'Film thickness (nm)'

#********start ternary plotting
pylab.figure(figsize=(10, 6))
ax=pylab.subplot(111)
##stp = TernaryPlot(ax, ellabels=['Au', 'Si', 'Cu']) 
stp = TernaryPlot(ax, ellabels=['Au', 'Si', 'Cu'], minlist=[0.47, 0.12, .2])
stp.grid(nintervals=3)
stp.label(fontsize=14)




#plot za value from above by color
stp.scatter(ca, s=80, c=za, label='_', cmap=cm.jet, alpha=1., marker='o') #scatter doesn't work well with legend, so label="_" (hides it); cmap chooses the color scheme; alpha allows some transparency to see overlapping data
stp.colorbar(title, fontsize=14)
#stp.ax.set_title(title, fontsize=14)
#****

##plot cellnumbers
#celllist=[1, 2]+range(4, 21)+[22]+[24, 25]
#for selectcell in celllist:
#    stp.text(comp[selectcell-1], `selectcell`, ha='center', va='center', color='r', fontsize=12)

##plot points by color
#celllist=[1, 2]+range(4, 21)+[22]+[24, 25]
#minlist=[c.min() for c in comp[numpy.array(celllist)-1, :].T]
#rangelist=numpy.float32([[m, 1.-numpy.concatenate([minlist[:i], minlist[i+1:]]).sum()] for i, m in enumerate(minlist)])
#colors=stp.color_comp_calc(comp[numpy.array(celllist)-1, :], rangelist=rangelist)
#stp.colorcompplot(comp[numpy.array(celllist)-1, :], '.', colors=colors, markersize=20)
#stp.line([0.6123922371385736, 0.14728011617695427, 0.24032764668447215], [0.48297887710346687, 0.21946269934149762, 0.29755842355503548], fmt='k-')