Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request - Ternary Plot with Scaled Axes to Account for Off-Axis Components #84

Closed
EkaitzEsteban87 opened this issue Mar 2, 2024 · 2 comments

Comments

@EkaitzEsteban87
Copy link

The ternary plot is designed to visualize only three components simultaneously. However, for models containing more than three components, the sum of the three on-axis (displayed) components equals 1 minus the sum of the off-axis (non-displayed) components.

Is there a way to scale the plot axes such that the maximum value for a component can reach 1 minus the sum of the off-axis components?

Similar to the approach illustrated here: https://www.jmp.com/support/help/en/17.2/index.shtml#page/jmp/ternary-plots-with-more-than-three-components.shtml#

best regards,

@ms609
Copy link
Owner

ms609 commented Mar 5, 2024

Thanks for the question. If I've understood the link correctly, all points you would look to plot would have the same values for the off-axis components (x4 and x5), so the Ternary plot is essentially a single plane of the full five-dimensional hyper-tetrahedron.
So the existing auto-rescaling should position the points in the correct location. I think what you are asking is to label the axes accordingly, which can be accomplished using

point <- c(x1 = 0.4, x2 = 0.2, x3 = 0.1, x4 = 0.2, x5 = 0.1)
TernaryPlot(axis.labels = seq(0, 0.7, by = 0.1), grid.lines = 7)
TernaryPoints(point[1:3])

image

Does this accomplish your goals? Is there a general case that you would see as usefully accomplished by an additional parameter to TernaryPlot()?

Related: #83

@EkaitzEsteban87
Copy link
Author

Yes this accomplish my goals. Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants