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?
Asked
Active
Viewed 433 times
-1
-
What do you mean by *"R-cran"*, is it "base R, no external libraries"? It helps if you provide a minimal working (reproducible) example. This includes sample code (including listing non-base R packages), sample data (e.g., `dput(head(x))`), and expected output. Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Jan 24 '19 at 21:05
-
`rasterImage(... , xpd=T)` can plot outside the panel limits, if you set the y coords appropriately. – user20650 Jan 24 '19 at 21:26
-
thank you , the xpd=T works fine to put raster outside the plot region. rasterImage(LogoUdeM , 0, 110, 2, 130, xpd=T) rasterImage(LogoLemp , 11.5, 105, 12.5, 125,xpd=T) – P. Audet Jan 28 '19 at 14:54
1 Answers
2
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)

Wai Ha Lee
- 8,598
- 83
- 57
- 92

P. Audet
- 21
- 3