subt | R Documentation |
Add bold title with second line in smaller font with subtitle.
Functions bquote
and
atop
are used to achieve
this effect.
subt(Title = NULL, subTitle = NULL)
Title |
The first line of title, which will be in bold. |
subTitle |
The second line of title, which will be smaller and and in italics. |
Formated title.
May not work with plotting functions from package hyperSpec.
Vilmantas Gegzna
Other spHelper utilities:
IQR_outliers()
,
expr2text()
,
mad_outliers()
,
rmExpr()
,
sd_outliers()
,
unGroup()
,
uncall()
subt("Cars")
## bold("Cars")
subt("Cars","Distance vs. speed")
## atop(bold("Cars"), atop(italic("Distance vs. speed")))
# ----------------------------------------------------------------
plot(cars[,1:2], main = "Cars")
plot(cars[,1:2], main = subt("Cars")) # the same as in previous line
plot(cars[,1:2], main = subt("Cars","Distance vs. speed"))
plot(cars[,1:2], main = subt(subTitle = "Distance vs. speed"))
# ----------------------------------------------------------------
library(ggplot2)
g <- qplot(mpg, wt, data=mtcars)
g + ggtitle("Cars") # non-bold title
g + ggtitle(subt("Cars")) # bold title
g + ggtitle(subt("Cars","Distance vs. speed"))
g + ggtitle(subt(subTitle = "Distance vs. speed"))
# ----------------------------------------------------------------
library(lattice)
xyplot(eruptions~waiting, data = faithful)
xyplot(eruptions~waiting, data = faithful,
main = "Old Faithful Geyser Data")
xyplot(eruptions~waiting, data = faithful,
main = subt("Old Faithful Geyser Data"))
xyplot(eruptions~waiting, data = faithful,
main = subt("Old Faithful Geyser", "Data"))
xyplot(eruptions~waiting, data = faithful,
main = subt(subTitle = "Old Faithful Geyser Data"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.