Home > Net >  Adding decimal places for glue command in ggplot
Adding decimal places for glue command in ggplot

Time:08-25

Continuation to this Figure 1

How do I make sure that the labels wrote $\phi_1 = 0.10$ instead of $\phi_1 = 0.1$?

CodePudding user response:

With format and nsmall:

...  
facet_wrap(~ glue('phi[1]*" = {format(round(q, 2), nsmall = 2)}"')  
...
  • Related