[19022] in s-news-athena

home help back first fref pref prev next nref lref last post

[S] problem with function from 3.3 to 4.+

daemon@ATHENA.MIT.EDU (Sara Adlerstein)
Tue Aug 24 10:02:36 1999

Message-Id: <00dd01beee39$321c3ad0$30576486@hydrobio.unihamburg.de>
Reply-To: "Sara Adlerstein" <sadlerstein@uni-hamburg.de>
From: "Sara Adlerstein" <sadlerstein@uni-hamburg.de>
To: <s-news@wubios.wustl.edu>
Date: Tue, 24 Aug 1999 16:01:43 +0200
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit


Hi!

I would really appreciate if somebody could please tell me what has changed
from version 3.3 to 4.++ to make the following map function to work
significantly slower and to give a long list of error messages with points
out of the range such as:

WARNING: Line out of bounds: x1=-6.732800, y1=61.947498


I did change the defunct function win.graph() by graphsheet()

map.f <- function(option = 2){

win.graph(width = 7.5, height = 11)

if(option == 1) {

xx <- nord$lon

yy <- nord$lat

limi <- nord$limi

range(nord$lon[ - nord$limi])

range(nord$lat[ - nord$limi])

par(xaxs = "i", yaxs = "i")

plot(rangex, rangey, xlab = "LONGITUDE",

ylab = "LATITUDE", xaxt = "n", yaxt= "n", type = "n")

title("North Sea")

toreversex <- pretty(par("usr")[1:2])

axis(1, at = toreversex, lab = toreversex)

axis(2)

}

else if(option == 2) {

#to draw a smaller region

x <- nord$lon

y <- nord$lat

x[nord$lon == -99] <- 10000

y[nord$lon == -99] <- 10000

xx <- x[x > -4]

yy <- y[x > -4]

xx <- x[y > 51]

yy <- y[y > 51]

limi <- seq(along = xx)[xx == 10000]

rangex <- c(-4, 10)

rangey <- c(51, 62)

par(xaxs = "i", yaxs = "i")

plot(rangex, rangey, xlab = "LONGITUDE",

ylab = "LATITUDE", xaxt = "n", yaxt

= "n", type = "n")

title("")

toreversex <- pretty(par("usr")[1:2])

axis(1, at = toreversex, lab = toreversex)

axis(2)

}

for(j in 1:(length(limi) - 1)) {

j1 <- limi[j] + 1

j2 <- limi[j + 1] - 1

if(j1 != (j2 + 1)) {

x <- xx[j1:j2]

y <- yy[j1:j2]

lines(x, y)

}

}

}

Thank you very much in advance

Sara Adlerstein

Universität Hamburg




-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

home help back first fref pref prev next nref lref last post