Amy
Amy

Reputation: 75

How to make superscripts bold within an expression

I'm trying to make an axis title which includes superscript and subscript but also need the whole title to be in bold. When I place bold after expression, only the normal text becomes bold, leaving the superscript and subscript in a plain typeface. How do I make the whole title bold?

plot+labs(y=expression(bold(paste("L",og[10]," cell concentration (cells ",ml^-1,")",sep=""))))

this is my code so far, 10 and -1 are sub and superscripted as needed, but not in bold.

Upvotes: 1

Views: 1808

Answers (1)

Ben
Ben

Reputation: 30539

Instead of using numbers (10 and -1) for subscript and superscript respectively, use text ("10" and "-1"):

labs(y=expression(bold(paste("L",og["10"]," cell concentration (cells ",ml^"-1",")",sep=""))))

Upvotes: 2

Related Questions