[R] crosshair in scatterplot to mark special points

Mike R mike.rstat at gmail.com
Mon Jun 13 08:52:45 CEST 2005


In a plot on an X11 device,  I'd like to mark a few points with 
a large thin "crosshairs".  By "mark" I mean: draw the crosshair
on the plot.

The two unsatisfactory methods that I have are:

METHOD 1:
   points( x, y, pch="+" ,cex=2)

METHOD 2:  
    line(xa, xb, y0, y0)
    line(x0, x0, ya, yb)

Method #1 produces a crosshair with fat lines.  It is not possible
to adequately scale the "plus-sign" for my purposes, due to messages like:

   X11 used font size 34 when 42 was requested

Method #2 produces a thin crosshair, but it is difficult to get the two 
crosshair lines to be of the same physical length on the device.  the 
lines also change length when i change/resize the device.

Thanks in advance for any help or suggestions,

Mike

platform i686-pc-linux-gnu
arch     i686             
os       linux-gnu        
system   i686, linux-gnu  
status                    
major    2                
minor    1.0              
year     2005             
month    04               
day      18               
language R




More information about the R-help mailing list