[R-sig-Geo] add image to plot

Roger Bivand Roger.Bivand at nhh.no
Wed Dec 11 14:58:49 CET 2013


On Wed, 11 Dec 2013, James Rooney wrote:

> Hi Agus,
>
> Eh perhaps not - is there a more suitable list ? I thought sticking 
> logos into maps would be common enough practice here ? I'm not sure gimp 
> is a solution since it also depends on ghostscript. I'm starting to 
> tihnk Adobe Ilustrator is my only option - which is irritating since I 
> don't have it.

You want to add an image for which you have either JPEG or EPS versions 
available to base R plots? If you convert your JPEG to PNM, use:

library(pixmap)
?"addlogo-methods"

Consider using locator() to provide the anchor for the logo.

Roger

>
> James
> ________________________________________
> From: Agustin Lobo [alobolistas at gmail.com]
> Sent: 11 December 2013 12:42
> To: James Rooney
> Cc: r-sig-geo at r-project.org
> Subject: Re: [R-sig-Geo] add image to plot
>
> James,
> Are you sure this is the right list for this question?
> I would rather use gimp for that purpose.
> Agus
>
>
> On Wed, Dec 11, 2013 at 12:10 PM, James Rooney <ROONEYJ4 at tcd.ie> wrote:
>> Anyone got experience with grImport even ?
>> I'm at my wits end with this. Think I'm going to have to just do it in photoshop or something after the fact.
>>
>> James
>> ________________________________________
>> From: r-sig-geo-bounces at r-project.org [r-sig-geo-bounces at r-project.org] On Behalf Of James Rooney [ROONEYJ4 at tcd.ie]
>> Sent: 09 December 2013 12:05
>> To: r-sig-geo at r-project.org
>> Subject: [R-sig-Geo] add image to plot
>>
>> Hi all,
>>
>> I need to add a logo to a plot. I have the logo in eps and jpg formats though can convert it to something else if needed.
>> My preference is to use the eps version since I am plotting my graphs to an eps file.
>> However I'm having a problem - with grImport - it is not detecting all the features of the image (not picking up colours and missing internal features of plot.
>>
>> My code is thus:
>>
>> PostScriptTrace("LogoLarge.eps")
>> logo<-readPicture("LogoLarge.eps.xml")
>>
>> Does anyone know why it is not catching all features of the image ?
>> Any other way of doing is ?
>>
>> James
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list