0

I'm trying to make my y-axis label read as "Nam expression" but seem to be having trouble. I'm using this command (I've tried a number of combinations of quotations and parentheses already but nothing seems to work):

plot(NAM_expression_over_time[,2], xlab = "Time (hours)" , ylab =  expression(italic("Nam ")), "expression")

I get this error message:

Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ

How can I go about solving this problem?

Phil
  • 7,287
  • 3
  • 36
  • 66
  • I've also tried this: plot(NAM_expression_over_time[,2], xlab = "Time (hours)" , ylab = expression(italic("Nam "), + "expression")) and the word Nam (italicized) shows up but not the word "expression" – Maleana Khoury Jun 10 '20 at 04:20
  • I think you want `plot(NAM_expression_over_time[,2], xlab = "Time (hours)" , ylab = expression(italic("Nam ")~"expression"))` – MrFlick Jun 10 '20 at 05:06
  • MrFlick, Thank you! I was just about to comment that I used plot(NAM_expression_over_time, type = "l", las = 1, xlab = "Time (hours)" , ylab = expression("SLR of" ~italic("Nam"))) (I changed the title) and it worked! – Maleana Khoury Jun 10 '20 at 05:37

0 Answers0