There's something that you're not telling me. If you want something other than your data, why use your data. If you have another set of data that you wish to overlay on the image then you are going to have to scale one of the data sources to match the other. I'm not sure where your problem is but the code below might prove useful in you understanding how the plotting occurs. I assume that image always use the -.25, 1.25 limits, but this would need to be confirmed.
 
I assume that when you talk about trying to use label, you are referring to the Hmisc package. I don't use this function so I can't give advice about it. However I think you probably need to be more familiar before you will get the best out of Frank's package. Someone else on the list may be able to help in the use of this function.
 
x<-matrix(c(1,1,0,1,0,1,0,1,1),3,3)
 
# dummy secondary data
y <- runif(20) * 20
z <- runif(20) * 20
y1 <- (y/(20/1.5)) - 0.25 # rescale y from 0 to 20 to -.25 to 1.25
z1 <- (z/(20/1.5)) - 0.25
x;y;z;y1;z1
 
par(mfrow = c(1,3))
image (x,xlim =c(-0.25,1.25),ylim = c(-0.25,1.25))

image(x,xlim =c(0,0.5),ylim = c(0.1,0.9),axes = FALSE)
points(y1,z1)

image (x,axes = FALSE,xlim =c(-0.25,1.25),ylim = c(-0.25,1.25))
points(y1,z1)
rect(0,0.1,0.5,0.9)
axis(2,at = seq(-0.25,1.25,length = 5),labels = seq(0,20, length = 5))
 
Tom

 -----Original Message-----
From: Costas Vorlow [mailto:K.E.Vorloou@durham.ac.uk]
Sent: Wednesday, 12 January 2005 6:22 PM
To: Mulholland, Tom
Subject: Re: [R] Changing the ranges for the axis in image()



Dear Tom,

Thanks. What happens though If I want an entirely different range than that of my data? I am trying with label() but it doesn't work properly.

Best,
Costas

Mulholland, Tom wrote:


Setting Axes = FALSE does not remove the axes, you can therefore still set the limits using xlim and ylim.



x<-matrix(c(1,1,0,1,0,1,0,1,1),3,3)

par(mfrow = c(1,2))

image (x)

image(x,xlim =c(0.5,0.8),ylim = c(0.1,0.9),axes = FALSE)





Tom



  

-----Original Message-----

From: Costas Vorlow [ mailto:K.E.Vorloou@durham.ac.uk]

Sent: Tuesday, 11 January 2005 9:29 PM

To:  r-help@stat.math.ethz.ch

Subject: [R] Changing the ranges for the axis in image()





Dear all,



I can not find/understand the solution to this from the help pages:



Say we have the following script:



 x<-matrix(c(1,1,0,1,0,1,0,1,1),3,3)

image(x)



How can I change the ranges on the vertical and horizontal axis to a 

range of my own or at least place a box frame around the image if I 

choose to use "axes=FALSE"?



Apologies for such a bsic question and thanks beforehand for 

your answers.



______________________________________________

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help

PLEASE do read the posting guide! 

http://www.R-project.org/posting-guide.html



    





  


-- 

============================================================================

This e-mail contains information intended for the addressee only.  It may be confidential and may be the subject of legal and/or professional Privilege. Any dissemination, distribution, copyright or use of this communication without prior permission of the addressee is strictly prohibited.

---------------------------------------------------------------------------

 Costas E. Vorlow                   | Tel: +44 (0)191 33 45727

 Durham Business School	 	    | Fax: +44 (0)191 33 45201

 Room (324), University of Durham,  | email: K.E.Vorloou(at)durham.ac.uk

 Mill Hill Lane,                    | or : costas(at)vorlow.org

 Durham DH1 3LB, UK.                |  http://www.vorlow.org

  http://ssrn.com/author=341149      | replace (at) with @ for my email

----------------------------------------------------------------------------

  Fingerprint: B010 577A 9EC3 9185 08AE  8F22 1A48 B4E7 9FA6 C31A



   "How empty is theory in presence of fact!"  (Mark Twain, 1889)


	[[alternative HTML version deleted]]


