title: Converting xy coordinates to ternary space for ternary plot in R
body: <p>I have troubles creating a ternary plot. I tried both the functions in the <code>ggtern</code> and <code>Plotly</code> package. I have a set of (x,y) coordinates, all between <code>0</code>d and <code>1</code>. When I just do a regular <code>geom_point()</code> plot, I can nicely see the results in Cartesian space.</p>
  
  <p>Then I have tried the <code>ggtern()</code> function after converting my (x,y) coordinates to ternary space but I get a very different result and the points don't show up with a similar distribution as in Cartesian space.
  Since I want to make a ternary contour plot, it seems quite necessary I get a similar distribution of points as in Cartesian space.</p>
  
  <p>I tried the following conversion, with different values for 'direction' option:</p>
  
  <pre><code>Ternary_Coords&lt;-as.data.frame(t(XYToTernary(VarX,VarY),direction=2)))
  </code></pre>
  
  <p>But my points never look the same as on the cartesian plot.
  What could the problem be?</p>
  
  <p>Many thanks in advance!</p>