Message Boards Message Boards

0
|
532 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Ternary contour plots

Posted 3 months ago

I seek the help of the community for guiding me on how to produce ternary contour and density plots in Mathematica?

2 Replies

Thank you very much Sir.

Inspired by the documentation for AxisObject:

ternFr[xmax_] := Graphics[{AxisObject[Line[xmax {{1, 0}, {0, 0}}], 
           {0, 100}, AxisLabel -> Placed["Component A", 
               {0.5, {0.5, 2.5}}], RotateLabel -> Automatic, 
           TickDirection -> "Inward"], 
         AxisObject[Line[xmax {{0, 0}, {0.5, Sqrt[3]/2.}}], 
           {0, 100}, AxisLabel -> Placed["Component B", 
               {0.5, {0.5, -2.}}], RotateLabel -> 60*Degree, 
           TickDirection -> "Inward"], 
         AxisObject[Line[xmax {{0.5, Sqrt[3]/2.}, {1, 0}}], 
           {0, 100}, AxisLabel -> Placed["Component C", 
               {0.5, {0.5, -2.}}], RotateLabel -> -60*Degree, 
           TickDirection -> "Inward"]}, 
       PlotRange -> xmax {{0, 1}, {0, 1}}, Frame -> True];
Show[DensityPlot[x^2 + x*y + (100 - x - y), 
     Element[{x, y}, Triangle[100*{{0, 0}, {1, 0}, 
             {1/2, Sqrt[3]/2}}]], Frame -> None],
  ternFr[100]]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract