[R] Help with marmap package

Jake William Andrae jake.andrae at adelaide.edu.au
Thu Feb 16 07:58:21 CET 2017


Hello,


I'm using the 'Marmap' R package to create ocean bathymetry maps. I've managed quite well, but I'm having a little difficulty with setting my x-axis (longitude) limits. When I run the code, the map is projected with large white bands on either side of the desired longitude limits. I've tried setting the limits myself (i.e xlim = c(115, 130)). I've also tried setting the 'xaxs' parameter to 'i', with no luck. I've included the code below, with the NOAA bathymetry data I'm trying to map.


If anyone has had any experience with this package and has encountered similar problems and has a solution, I'd love to hear about it.



# Load package
library(marmap)

# Import bathymetry
bat <- getNOAA.bathy(130, 115, -26, -12, res = 1, keep = TRUE)

# Plot map with isobaths every 1000m
plot(bat, image = TRUE, land = TRUE, deep=-10000, shallow=-1000, step=1000,
                      drawlabels = TRUE, bpal = list(c(min(bat,na.rm=TRUE), 0, blues),
                      c(0, max(bat, na.rm=TRUE), greenbrowns)), lwd = 0.1, col = 'grey20')


Regards,


Jake Andrae
PhD Candidate
Geology & Geophysics – Sprigg Geobiology Centre
Department of Earth Science
School of Physical Sciences
The University of Adelaide, AUSTRALIA 5005
Phone: 0407701565
Email: jake.andrae at adelaide.edu.au


	[[alternative HTML version deleted]]



More information about the R-help mailing list