I'd like to draw a surface on a ternary diagram.

Until now, I can plot density maps on a ternary diagram (cf. density map). But I would like to replace the density map by a surface, like on figs a and b.

Is it possible to do it with tikz - pgfplots - ternaryaxis - tikz-3dplot ?


Regarding the two-dimensional ternary axes in your screen shot: yes, using its patch plots:


    axis on top,
    point meta=\thisrow{C}
] table{
     X Y Z C
     0 0 1  100
     1 0 0  0
     0.5 0.5 0  0

     0.5 0.5 0  0
     0 1 0  20
     0 0 1 100

enter image description here

The plot handler expects a series of patches, per default using patch type=triangle. In my case, I provided two triangles, and provided the color data in column C of the input table.

All other plot handlers should work as well, even surf which expects a matrix of input values.

Regarding the three-d visualization: there is no builtin support for such axes.

  • Even with a surf as an argument of the addplot3 command, the figure is still 2D, like fig [c and d] (journals.aps.org/prb/article/10.1103/PhysRevB.91.024108/figures/…) , but I want to draw figures like fig a and b. – Jérôme Dequeker Nov 9 '15 at 6:48
  • Ok. As mentioned above: "Regarding the three-d visualization: there is no builtin support for such axes." This is the answer. – Christian Feuersänger Nov 9 '15 at 19:18
  • Sorry. I have read your answer too fast. Don't you think the figures I linked are made with pgfplots ? – Jérôme Dequeker Nov 10 '15 at 6:25
  • 1
    No problem! And yes, I am quite sure that the linked figures are not made with pgfplots. If they were, I would happily think about ways to incorporate their solution into pgfplots. – Christian Feuersänger Nov 10 '15 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.