Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

r - How to split the Main title of a plot in 2 or more lines?

Is it possible to split the main title of a plot() in 2 or more lines in R?

Moreover I have a title which consists of many argumenets pasted together

plot(1, main=paste("X:",1," ","Y:", 2," ","Z:",3))

How can I insert a line break between Y and Z in the main?

Thanks E.C

question from:https://stackoverflow.com/questions/8112786/how-to-split-the-main-title-of-a-plot-in-2-or-more-lines

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Like this:

plot(1)
title(main="This is 
Title")

Edit:

Try this

plot(1, main=paste("X:",1," ","Y:", 2," ","
Z:",3))

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...