[R] Help: add arrows on a filled.contour figure

Z Cui Z.Cui at bham.ac.uk
Wed Dec 4 18:31:03 CET 2002


Dear All

I would like to use filled.contour to plot something with arrows on it. I did it in this way:

filled.contour(1:nx,1:nz,u,col=gray(rev((0:20/20))))
for (j in zseq ) for (i in xseq) arrows(i, j, i+u[i,j],j+w[i,j],length=angleng,angle=angarrow,code=2, lwd=1,col="black")

The peoblem is that the arrows use the whole device area, including the key on the right hand side of the filled contour. Does anyone know how to work out this problem?

Many thanks for your kind reply.
Dr Zhiqiang Cui
School of Geography and Environmental Sciences
The University of Birmingham
Edgbaston, Birmingham
B15 2TT




More information about the R-help mailing list