Dear friends, The user coordiante system in the R graphics is easy to understand as it simply corresponds to the range of values on the axes of the plot. However, sometimes, we want to kown the coordinates of a region in other system, e.g., the normal coordinate system whose origin is the the upper-left cornner of the drawing area which is used to set the hot regions in the HTML image maps. Is there any suggestion?
For example, I execute the code, > png("x.png", width = 480, height = 480, + pointsize = 12, bg = "white", res = 100); > plot(0, xlim=c(0, 100), ylim = c(0,100), type="n") > rect(0, 0, 100, 100) > points(0, 0, col = 'red') > dev.off() I will get a figure named "x.png". The resolution of this figure is 100 dpi and the width and height are 480 pixels when I opened it with Photoshop. When I move the cursor to the point drawed by points(0, 0, col = 'red'), I can find the position of this point is about (87, 376) [(x, y)]. I want to know how to convert the (0, 0) in the user coordinate system to this value? I look forward to hearing from you. -- ADDRESS: Bioinformatics Center, Shanghai Institutes for Biological Sciences, Chinese Academy of Sciences 320 Yueyang Road, Shanghai 200031, P.R.China TELEPHONE: 86-21-54920086 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.