R/tmPrintTitles.R

Defines functions tmPrintTitles

tmPrintTitles <- function(vps, title, title.legend, position.legend, fontfamily.title, fontfamily.legend) {
    pushViewport(vps$vpDatTitle)
    grid.text(title, gp=gpar(fontfamily=fontfamily.title))
    upViewport()
    
    if (position.legend!="none") {    
        pushViewport(vps$vpLegTitle)
        grid.text(title.legend, gp=gpar(fontfamily=fontfamily.legend))
        upViewport()
    }
}

Try the treemap package in your browser

Any scripts or data that you put into this service are public.

treemap documentation built on May 31, 2023, 8:01 p.m.