| legendmt | R Documentation | 
Draw a legend with title spanning several lines (i.e. with line breaks). Note that this is in development and not all inputs are correctly vectorized yet.
legendmt(
  x,
  y = NULL,
  legend,
  title,
  x.intersp = 1,
  fill = NA,
  col = par("col"),
  border = NA,
  lty = NA,
  lwd = NA,
  pch = NA,
  ...
)
| x,y,legend | Arguments as in  | 
| title | Character with linebreaks or vector of charstrings. | 
| x.intersp,fill,col,border,lty,lwd,pch | Arguments as in  | 
| ... | Further arguments passed to  | 
legend output
Berry Boessenkool, berry-b@gmx.de, Apr 2017
legend
plot(1:10)
  legend("topleft", letters[1:4], col=1:4, pch=1, title="very long title to be split up")
legendmt("topleft", letters[1:4], col=1:4, pch=1, title="very long title\nnow splat up")
# Alternative:
plot(1:10)
legend("topleft", "very long title to be split up")
legend("topleft", letters[1:4], col=1:4, pch=1, inset=c(0,0.09) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.