[R-sig-Geo] [FORGED] specifying axis intervals in maptools?

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Thu Sep 26 04:37:27 CEST 2019

On 26/09/19 8:52 AM, Rodrigo Plei wrote:

> Dear colleagues,
> How to I specify latitude and longitude intervals on x and y axis in a map
> using the maptools package?
> Suppose that I plotted a map and using the argument "axes = TRUE", I got
> the y (latitude) axis plotted to show "-23.6 -23.4 -23.2 -23 -22.8 -22.6"
> (i.e. 0.2 intervals), but I was actually wanting to see "-23.6 -23.2 -22.8
> " (0.4 intervals). How can I customize the intervals?
> Any help will be greatly appreciated.

Given that I am not misunderstanding you (always a distinct possibility 
for me!) I believe that all you need to do is set axes=FALSE in your 
initial call, then add the axes using something like:

axis(side=2,at=c(-23.6, -23.2, -22.8, <whatever?))

Can't say for sure without a reproducible example.



Rolf Turner

Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

More information about the R-sig-Geo mailing list