rggplot2axisternaryggtern

Increase size of axis labels in ternary diagrams using ggtern


I would like to increase the size of the ternary diagram, when using the following code:

# Dataset
NP_Mobj
    EE   ES   SE id
1 0.15 0.25 0.60  1
2 0.30 0.20 0.50  1
3 0.15 0.15 0.70  1
4 0.40 0.20 0.40  1
5 0.70 0.10 0.20  1
6 0.50 0.30 0.20  1
7 0.32 0.20 0.48  2
idNP  <- "1";   idMObj <- "2";
Group <- as.factor(NP_Mobj$id)
 IWRM_Trinagle_NPCriteria_MObj <-  ggtern(NP_Mobj, aes(
    x = SE,
    y = EE,
    z = ES
  ))                                                    + 
    geom_point(aes(color = Group ), size = 8)           + 
    theme_showarrows()                                  +
    labs(xarrow = "Social equity (SE)",
         yarrow = "Economic efficiency (EE)",
         zarrow = "Environmental sustainability (ES)")  +
    scale_colour_manual(breaks = c(idNP, idMObj),
                        values = c("black", "red"))     +
    theme_clockwise() + theme_bw()
IWRM_Trinagle_NPCriteria_MObj <- IWRM_Trinagle_NPCriteria_MObj +  theme(legend.position="none")

enter image description here

I would like to increase the size of the three axis labels and the axis values.


Solution

  • You can use the axis.title and axis.text arguments of theme() to change the appearance of axis titles and texts.

    library(ggtern)
    ggtern(NP_Mobj, aes(
      x = SE,
      y = EE,
      z = ES
    ))                                                    + 
      geom_point(aes(color = Group ), size = 8)           + 
      theme_showarrows()                                  +
      labs(xarrow = "Social equity (SE)",
           yarrow = "Economic efficiency (EE)",
           zarrow = "Environmental sustainability (ES)")  +
      scale_colour_manual(breaks = c(idNP, idMObj),
                          values = c("black", "red"))     +
      theme_clockwise() + 
      theme_bw() +  
      theme(legend.position="none", 
            axis.text = element_text(size = 18),
            axis.title = element_text(size = 20))