2

Whenever I use an expression-like command for the plot labels, axis labels, tick labels I get an error message in the form of

invalid use of [number] < 0 in 'X11_MetricInfo'

For example, with the code from here :

labNames <- c('xLab','yLab')
xlab <- bquote(.(labNames[1]) ~ x^2)
ylab <- bquote(.(labNames[2]) ~ y^2)
plot(c(1:10), xlab = xlab, ylab = ylab)

I get:

Error in title(...) : invalid use of -32 < 0 in 'X11_MetricInfo'

This is also the case when I substitute bquote() with expression() or TeX() from latex2exp package.

What is X11? How I can solve this?

I'm working with

R version 4.1.2 (2021-11-01) -- "Bird Hippie" Platform: x86_64-pc-linux-gnu (64-bit)

I found these posts:

https://community.rstudio.com/t/problem-with-greek-letters-in-plots/132851

R: invalid use of XX < 0 in 'X11_MetricInfo'

https://stat.ethz.ch/pipermail/r-help/2017-June/447748.html

but there are also no solutions to find.

Falrach
  • 145
  • 8

0 Answers0