Message Boards Message Boards

0
|
7567 Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Can Mathematica produce Ternary Plots ?

Posted 10 years ago

Can Mathematica produce a Ternary Plots ?

POSTED BY: Nelson Zink
3 Replies

Please also see this: How to plot ternary density plots?

POSTED BY: Sam Carrettie
Posted 10 years ago

Perfect!

POSTED BY: Nelson Zink

Do you mean ternary plots like this?

enter image description here

That was produced with the Ternary Plots graphics in my Presentations package, which can be purchased through my web site. The various commands are:

TernaryScale, ToTernaryCoordinates, FromTernaryCoordinates, TernaryReplacementRules, DrawTernaryGrid, TernaryTriangle, TernaryPlotRange, TernaryPadding, TernaryPlot, TernaryLocator, TernaryContourDraw, TernaryRegionDraw, TernaryDraw3D.

The actual code for the above plot was:

<< Presentations`
Module[
 {data1, data2, temp1, temp2},
 data1 = Table[{temp1 = RandomReal[NormalDistribution[20, 2]], 
    temp2 = RandomReal[NormalDistribution[30, 4]], 
    TernaryScale - temp1 - temp2}, {40}];
 data2 = Table[{temp1 = RandomReal[NormalDistribution[25, 8]], 
    temp2 = RandomReal[NormalDistribution[50, 1]], 
    TernaryScale - temp1 - temp2}, {40}];

 plot1 = TernaryPlot[
   DrawTernaryGrid[5,
    TGBackground -> LightBlue,
    TGLabels -> {1.4, {"x", "y", "z"}, "side"}],
   CirclePoint[ToTernaryCoordinates[#], 3, Black, Orange] & /@ data1,
   CirclePoint[ToTernaryCoordinates[#], 3, Black, Green] & /@ data2]
 ]
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