[19029] in s-news-athena

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

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

daemon@ATHENA.MIT.EDU (Gebhart, Kristi)
Tue Aug 24 13:02:16 1999

Message-Id: <2E5CFF296EC2D01190D800802965F847859C2B@terra.cira.colostate.edu>
From: "Gebhart, Kristi" <Gebhart@CIRA.colostate.edu>
To: Sara Adlerstein <sadlerstein@uni-hamburg.de>,
        S-news
	 <S-news@wubios.wustl.edu>
Date: Tue, 24 Aug 1999 10:56:37 -0600
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit


Hi Sara,

I had the same problem and complained to tech support about it in S-PLUS ver
4.5 for Windows many months ago.  I don't have the problem in ver 4.0, but
do in 4.5.  You can try turning on or off "editable graphics."  I found I
had the problem with one, but not the other.  I haven't used S-PLUS for
quite awhile, so I'm sorry I can't remember which one worked and which
didn't.  The problem apparently arises when there are "too many" lines that
need to be clipped.  Unfortunately this almost always happens to me when
drawing maps, as I usually don't want the whole U.S., but only some small
portion.  I don't know if the problem still exists in S-PLUS 2000 or not, as
I don't have that version.

KG
-----------------------------------------------------
Kristi A. Gebhart, Research Physical Scientist
National Park Service, Air Resources Division
CIRA, Colorado State University
(970) 491-3684 (voice)
(970) 491-8598 (fax)
gebhart@cira.colostate.edu



> -----Original Message-----
> From:	Sara Adlerstein [SMTP:sadlerstein@uni-hamburg.de]
> Sent:	Tuesday, August 24, 1999 8:02 AM
> To:	s-news@wubios.wustl.edu
> Subject:	[S] problem with function from 3.3 to 4.+
> 
> 
> 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
-----------------------------------------------------------------------
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