Skip to content

specifying axis intervals in maptools?

3 messages · Rolf Turner, Rodrigo Plei

#
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.

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

            
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=1)
axis(side=2,at=c(-23.6, -23.2, -22.8, <whatever?))

Can't say for sure without a reproducible example.

HTH

cheers,

Rolf Turner
#
Dear Rolf,

Thank you very much for your reply.

I did not send a reproducible example because it was just a local shape
file.

And, yes, your instructions worked like a charm! :)

Once again, thank you!

Best regards,

Rodrigo