Search code examples
rimageplotcran

R-cran put image in outer margin


I'd like to put 2 logos (.png) each side ot the title of a plot graph in R-cran. the rasterImage() function dont allow to put images outside the plot region. Is it powssible to do that with R-cran?


Solution

  • Thank you user20650, who said:

    rasterImage(... , xpd=T) can plot outside the panel limits, if you set the y coords appropriately.


    The xpd=T in rasterImage works fine to put my logo outside the plot region.

    rasterImage(LogoUdeM , 0, 110, 2, 130,      xpd=T)
    rasterImage(LogoLemp , 11.5, 105, 12.5, 125,xpd=T) 
    

    enter image description here