title: How to create ternary contour plot in Python?
body: <p>I have a data set as follows (in Python):</p>
  
  <pre><code>import numpy as np
  A = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0, 0.1, 0.2, 0.3, 0.4, 0.2, 0.2, 0.05, 0.1])
  B = np.array([0.9, 0.7, 0.5, 0.3, 0.1, 0.2, 0.1, 0.15, 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])
  C = np.array([0, 0.1, 0.2, 0.3, 0.4, 0.2, 0.2, 0.05, 0.1, 0.9, 0.7, 0.5, 0.3, 0.1, 0.2, 0.1, 0.15, 0])
  D = np.array([1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2])
  </code></pre>
  
  <p>I am trying to create ternary plots with matplotlib as shown in the figure (<a href="https://stackoverflow.com/questions/10879361/ternary-plot-and-filled-contour">source</a>). The axes are A, B, C and D values should be denoted by contours and the points need to be labelled like in figure.</p>
  
  <p><img src="https://i.stack.imgur.com/JpLl0.jpg" alt="enter image description here"></p>
  
  <p>Can such plots be created in matplotlib or with Python?</p>