[R] filed plot symbols

Ross Ihaka ihaka at stat.auckland.ac.nz
Tue Oct 17 20:28:38 CEST 2000


On Tue, Oct 17, 2000 at 04:13:51PM +0100, Dermot MacSweeney wrote:
> As a follow on to Bill's question, if we look at the example which he gives, the 
> legend will have lines going through the empty symbols. If there any way to 
> prevent this aside from the obvious (only use filled symbols in graphs).

The present plotting symbols resulted in a haphazard way.  The initial
few provide compatibility with S, and the filled ones were added as an
experiment.  I think that the filled symbols are a good idea, but
there needed to be a more systematic implementation (and the ability
for users to add their own glyphs).

Reworking the graphics is going to be the major focus of what I'm going
to be doing over this (southern) summer.  Plotting symbols will be part
of this.  I want to take a close look at legend/key as well.

One way of not having lines pass through the plotting points is to use
type="b" (both lines and points).

	plot(x, y, type="b", pch=1, lty="11")

or

	plot(x, y, type="n")
	points(x, y, pch=1)
	lines(x, y, type="b", pch=" ", lty="11")

This does leave a gap around the symbols which may be not what you want.

-- 
+----------------------------------------------------------------------+
| Ross Ihaka                         Email:  ihaka at stat.auckland.ac.nz |
| Department of Statistics           Phone:  (64-9) 373-7599 x 5054    |
| University of Auckland             Fax:    (64-9) 373-7018           |
| Private Bag 92019                                                    |
| Auckland, New Zealand                                                |
+----------------------------------------------------------------------+
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list