What is the use of 'Title' function in 'R' language?

 Posted by Niladri.Biswas on 5/1/2013 | Category: Others Interview questions | Views: 1112 | Points: 40

Use the title() function to add title and axis labels to a plot.

title(main="main title", sub="sub-title", xlab="x-axis label", ylab="y-axis label")

Graphical parameters (such as text size, font, rotation, and color) can also be specified
in the title() function. For example, the following produces a red title and a blue
subtitle, and creates green x and y labels that are 25 percent smaller than the default
text size:

title(main="My Title", col.main="red",

sub="My Sub-title", col.sub="blue",
xlab="My X label", ylab="My Y label",
col.lab="green", cex.lab=0.75)

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response