[R] Mapping in R

jgarcia at ija.csic.es jgarcia at ija.csic.es
Tue Mar 31 15:02:04 CEST 2009


It is relatively easy to do a small function for this in R:
a) select the desired width for your border
b) through a fix number or through the use of pretty(), establish the
number of rectangles you want along your border.
Then e.g., you can use rect() you build the sequence of black-white
rectangles along your border.

Hope this helps.

Javier García-Pintado
...




> Kelsey Scheitlin <kns07g <at> fsu.edu> writes:
>
>>
>> Hi, I am looking for a specific mapping capability in R that I can't
>> seem to
> find, but think exists. I would
>> like to make a border of a map have alternating black and white squares
> instead of the common latitude and
>> longitude grid.  (example:
>> http://www.cccturtle.org/sat_maps/map0bw8.gif). If
> anyone knows if
>> there is or is not a function capable if doing this could you please let
>> me
> know? Thanks!
>>
>> Kelsey
>
>   It's not QUITE what you're looking for, but
>
> plot(0:1,0:1,bty="n",axes=FALSE)
> box(bty="o",lwd=6,lty="FF")
>
> (See ?box, ?par under "bty" and "Line Type Specification")
>
> Otherwise you can do this by using par("usr") to find the
> edges of the map, seq() to construct appropriate x and y
> sequences, and segments() to draw the lines.
>
>   Ben Bolker
>
> ______________________________________________
> 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.
>




More information about the R-help mailing list