Re: [R] North Arrow (.png file) on a Map

2009-03-10 Thread Yihui Xie
Is this "arrow" satisfactory for you? north.arrow = function(x, y, h) { polygon(c(x, x, x + h/2), c(y - h, y, y - (1 + sqrt(3)/2) * h), col = "black", border = NA) polygon(c(x, x + h/2, x, x - h/2), c(y - h, y - (1 + sqrt(3)/2) * h, y, y - (1 + sqrt(3)/2) * h)) text(x, y, "N", adj = c(

[R] North Arrow (.png file) on a Map

2009-03-10 Thread Rodrigo Aluizio
Hi list. I would like to know how do I insert a North arrow, stored as a png file in my computer, in a map? I found lots of post asking similar things, one of them mentioned the pixmap package. The map was done using map() and shapefiles (the code is below). I’m using the pixmap () and addlogo()