Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205491

Italicize and Line Break in y-axis Title R ggplot

$
0
0

I am having issue with \n in my y-axis title. The title is long and would like to use \n newline option to separate it two different lines. How can I use \n using "expression". The code I tried below. The error is

Error in ylab == FALSE : comparison is not allowed for expressions.

Could anyone help me to fix this issue ?

p3 <- ggpar(p1, 
            main = "LYR", xlab = "TSR", 
            ylab = "% of", expression (~italic("bac. t"), "\n in sample in lyr"), 
            font.main = c(14,"bold", "black"), 
            font.x = c(14, "bold", "Black"), 
            font.y = c(14, "bold", "Black"),  
            font.tickslab = c(14,"bold", "black")) 
p3

Thank you


Viewing all articles
Browse latest Browse all 205491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>