I am trying to add a copyright disclaimer outside the plot borders of some images I have created. I can use mtext() to add the written portion, but I would like to have the Creative Commons license image (http://en.wikipedia.org/wiki/File:Cc.logo.circle.svg) before the text. I've found that I can plot a .png image inside the plot boundaries using rasterImage() but I can't figure out how to do it outside the boundaries. Any help would be great. If you know unicode or Adobe Symbol encoding for the CC logo, that might work too. ~Amelia McNamara Statistics PhD student, UCLA
Hi Amelia, Can you give an example (using text where you want the CC is fine)? Two angles I would try would be A) changing the regions or related but more flexible (and hence complex) B) use grid of course if you're making these with, say, ggplot2, you're already in grid (but then mtext probably would not work, though I have not tried it offhand). Anyway, an example (code please, not just the picture), will clear up all these questions and we can offer a solution tailored to what you are doing. Cheers, Josh On Sun, Sep 18, 2011 at 1:18 PM, Amelia McNamara <amelia.mcnamara at stat.ucla.edu> wrote:> I am trying to add a copyright disclaimer outside the plot borders of > some images I have created. I can use mtext() to add the written > portion, but I would like to have the Creative Commons license image > (http://en.wikipedia.org/wiki/File:Cc.logo.circle.svg) before the > text. I've found that I can plot a .png image inside the plot > boundaries using rasterImage() but I can't figure out how to do it > outside the boundaries. > > Any help would be great. If you know unicode or Adobe Symbol encoding > for the CC logo, that might work too. > > ~Amelia McNamara > Statistics PhD student, UCLA > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Joshua Wiley Ph.D. Student, Health Psychology Programmer Analyst II, ATS Statistical Consulting Group University of California, Los Angeles https://joshuawiley.com/
Hi, if your logo is in vector format you should probably try the grImport package; see its vignette for examples, also below, library(grImport) ## http://creativecommons.org/about/downloads/ PostScriptTrace("cc.logo.eps") cc <- readPicture("cc.logo.eps.xml") logo <- pictureGrob(cc[16:18], x=unit(1, "npc"), y=unit(0, "npc"), width=unit(2,"cm"), height=unit(2,"cm"), just= c("right", "bottom"), use.gc = FALSE, gp = gpar(fill = "grey40", col = "grey50")) plot(1:10, rnorm(10), panel.first = grid.draw(logo)) HTH, baptiste On 19 September 2011 08:18, Amelia McNamara <amelia.mcnamara at stat.ucla.edu> wrote:> I am trying to add a copyright disclaimer outside the plot borders of > some images I have created. I can use mtext() to add the written > portion, but I would like to have the Creative Commons license image > (http://en.wikipedia.org/wiki/File:Cc.logo.circle.svg) before the > text. I've found that I can plot a .png image inside the plot > boundaries using rasterImage() but I can't figure out how to do it > outside the boundaries. > > Any help would be great. If you know unicode or Adobe Symbol encoding > for the CC logo, that might work too. > > ~Amelia McNamara > Statistics PhD student, UCLA > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >