[R] plot character
Marc Schwartz
MSchwartz at medanalytics.com
Tue Jul 22 19:17:44 CEST 2003
On Tue, 2003-07-22 at 11:59, Luis Miguel Almeida da Silva wrote:
> Dear helpers
>
> Is it possible to plot with a desired character? For example "tr" for training error and "te" for test error.
> I tried
>
> plot(x,y,pch="tr")
>
> but only appears "t" in the plot
One option is to use text(x, y, "TextSymbol") for your point symbols.
This will by default place the "TextSymbol" in the plot region centered
on x,y.
You would first call:
plot(x, y, type = "n")
so that no points are plotted.
Then use:
text(x, y, "tr")
and
text(x, y, "te")
for each set of x,y coordinates as appropriate.
You can use the 'cex' argument to text() to adjust text size and of
course others for color, etc.
HTH,
Marc Schwartz
More information about the R-help
mailing list