How to italicize part (one or two words) of an axis title

前端 未结 3 653
情深已故
情深已故 2020-12-03 09:31

Is there any way to change the style of part of an axis title while keep the rest part unchanged? In my case, How could I italicize
\"bacteria X\" in the y-axis title? T

3条回答
  •  星月不相逢
    2020-12-03 10:19

    You could make an expression like this:

    my_y_title <- expression(paste("No. of ", italic("bacteria X"), " isolates with corresponding types"))
    .... + labs(y=my_y_title)
    

提交回复
热议问题