Setting background for TernaryPlot

I want to plot a triangle. Based on the input parameters (3 variables), it becomes clear on which region of this triangle, the point is located. The question is: "How can I set this photo as the background of my TernaryPlot."
Here is the Photo:

Here is the code:

library('Ternary')
library('jpeg')

my_image=readJPEG("PATH")     #path of the file
TernaryPlot(point='up', atip='A', btip='B', ctip='C', alab='Aax', blab='Bax', clab='Cax')

Sorry for creating the topic. I found the solution to that and it was quite simple.
Here is the modified part of the code:

TernaryPlot(atip='A', btip='B', ctip='C', alab='Aax', blab='Bax', clab='Cax', bg=rasterImage(my_image, par()$usr[1], par()$usr[3], par()$usr[2], par()$usr[4]))

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.