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
Barry Rowlingson
2005-Jun-13 09:19 UTC
[R] crosshair in scatterplot to mark special points
Mike R wrote:> 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. >Try using the numerical pch symbols. '3' is a crosshair, so see what the following do: plot(1:10,pch=3) plot(1:10,pch=3,cex=2) plot(1:10,pch=3,cex=4) They're probably documented somewhere, but: plot(1:26,pch=1:26,cex=2) will show you them. Baz