s-news
[Top] [All Lists]

par("usr")

To: "S-News" <s-news@lists.biostat.wustl.edu>
Subject: par("usr")
From: "Garrett, Robert" <garrett@NRCan.gc.ca>
Date: Wed, 26 Jul 2006 10:23:19 -0400
Thread-index: Acawvwq7+zt3KCEJT0asjBz4Zbu1eA==
Thread-topic: par("usr")
I am using S+ 6.2 (Build 6713) under Win 2K on an IBM laptop (500MB)

I am trying to "pretty up" some graphics, by adding annotation within the plot 
frame.  When using par("usr") to get the coordinates of the plot frame I 
sometimes get an erroneous value for par("usr")[3], the y coordinate of the 
lower x-axis of the plot.

This seems to relate to when I plot only part of the data for an ecdf, but not 
a cumulative probability plot.  However, within my ecdf function I do not call 
plot until after I have selected the subset of data to be plotted,  The lower 
x-axis plots at a y-coordinate of about 0.1, just as I expect, but 
par("usr")[3] returns a value of 0.03, which is what I would expect for the 
total data.  So I am bemused and befuddled.

Has this behaviour ever been seen before, or what is the stupid mistake I am 
making?

Any help would be appreciated,


Robert G. (Bob) Garrett                 Robert G. (Bob) Garrett
Emeritus scientist              scientique émérite
Geological Survey of Canada     Commission géologique du Canada
Natural Resources Canada        Ressources naturelles Canada
601 Booth St., Ottawa, Ontario  601 rue Booth, Ottawa (Ontario) 
Canada K1A 0E8          Canada K1A 0E8
Email: garrett@NRCan.gc.ca      Email: garrett@NRCan.gc.ca
Tel.: 613+995-4517              Tel.: 613+995-4517
FAX: 613+996-3726               FAX: 613+996-3726
------------------------------------------------------------------------------------------------------


<Prev in Thread] Current Thread [Next in Thread>