[R-sig-Geo] Problem with "image" function
Cristina Silva
csilva at ipimar.pt
Fri Jul 22 19:58:57 CEST 2011
Dear list members,
I have a SpatialGridDataFrame with sea depths. I have previously plotted
this object using "image" with a grey scale. I have used exactly the
same script and now the result is crossed by horizontal white lines.
As the script used was based in chunk no. 91 of cm_mod.R (book ASDAR,
figure 2.7), I repeated this script
> oopar <- par(mar=c(1,1,1,1)+0.1)
> grys <- grey.colors(8, 0.55, 0.95, 2.2)
> image(auck_el1, "band1", col=grys)
> plot(auck_gshhs, add=TRUE, pbg="white")
> transect_sp <- SpatialPoints(coords=cbind(seq(174.458,175.3,0.000833333),
> c(-37.03625)), proj4string=CRS("+proj=longlat +ellps=WGS84"))
> plot(transect_sp, add=TRUE, pch="-", cex=2)
> legend_image(c(174.2,174.25), c(-37.5,-37.2), auck_el1$band1,
> vertical=TRUE,
> offset.leg=0.8, col=grys)
> par(oopar)
and the result was also crossed by the same white horizontal lines.
I am using R version 2.13.1. I didn't have any problems with previous
versions.
Thanks for your attention
Cristina
--
------------------------------------------
Cristina Silva
INRB/L-IPIMAR
Unidade de Recursos Marinhos e Sustentabilidade
Av. de Brasília, 1449-006 Lisboa
Portugal
Tel.: 351 21 3027096
Fax: 351 21 3015948
csilva at ipimar.pt
More information about the R-sig-Geo
mailing list