Ternary Plot in R -


sincerely don't know how because i'm new r , codes seems confusing. saw following codes on website , trying apply own work.

#load data     df <- read.table(file = "~/desktop/pps-data.txt", header = t)      #create plot , store     plot <- ggtern(data = df, aes(x = xyp, y = xo, z = xy)) +                    geom_point(aes(fill = root),                               size = 4,                               shape = 21,                               color = "black") +                    ggtitle("pps 3-state model") +                    labs(fill = "root states") +                    theme_tern_rgbw() +                    theme(legend.position      = c(0,1),                          legend.justification = c(0, 1)) 

the text file used not available, couldn't file know how file arranged.

here data:

gravel  sand    mud 0.95    93.55   5.49 8.06    44.38   47.55 1.76    79.35   18.89 10.11   87.37   2.53 1.35    90.03   8.62 6.07    75.00   18.93 4.07    95.93   0.00 5.12    94.83   0.05 4.31    75.01   20.68 1.97    71.94   26.10 4.47    77.36   18.17 1.64    78.70   19.66 2.01    70.74   27.25 7.64    82.50   9.86 12.35   82.86   4.79 4.38    79.94   15.68 11.48   84.61   3.91 0.82    91.65   7.53 36.79   63.21   0.00 6.01    41.29   52.70 17.26   23.22   59.52 8.41    41.29   50.30 5.45    39.20   55.34 2.22    19.71   78.07 0.73    14.79   84.48 7.43    51.54   41.03 4.78    48.75   46.47 6.73    48.52   44.75 10.89   45.73   43.38 1.62    22.22   76.16 1.90    19.73   78.37 3.00    25.31   71.69 1.75    17.00   81.25 1.81    21.60   76.59 2.61    30.07   67.32 2.27    31.28   66.44 1.09    26.82   72.08 1.04    17.31   81.65 0.99    12.39   86.62 0.96    17.23   81.81  please 

i started with

library(ggtern) ggtern(df,aes(gravel,sand,mud))+geom_point() 

enter image description here


Comments

Popular posts from this blog

android - Automated my builds -

apache - GeoServer under https -

php - Iterate over object properties with keys from second array -