Search code examples
rplotplotmath

Plot the positive infinity symbol and negative infinity symbol


I was wondering how I can plot the positive infinity sign and -Infinity sign in plot?

Here is my R code (with no success):

plot(1, ty ='n', ann = F, xlim = c(-4, 6), ylim = c(-3.5, 1.5) )

text(c(-4, 6 ), rep(1, 2), c( bquote(- infinity  ), bquote(infinity  ) ) ) 

Solution

  • Try:

    text(c(-4, 6 ), rep(1, 2), c( bquote("- \U221E"), bquote("\U221E") ) )