From ripley at stats.ox.ac.uk  Mon Oct  5 14:44:07 2009
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 5 Oct 2009 13:44:07 +0100 (BST)
Subject: [Rd] suggest enhancement to segments and arrows to facilitate
 horizontal and vertical segments
In-Reply-To: <e21d304c0910020822r761cbaaeq2bee03abc21b5f6f@mail.gmail.com>
References: <e21d304c0910020822r761cbaaeq2bee03abc21b5f6f@mail.gmail.com>
Message-ID: <alpine.LFD.2.00.0910051334520.8274@gannet.stats.ox.ac.uk>

This isn't a one-way street, as it means that some erroneous calls 
will not be detected, and code written to take advantage of this will 
only work under R >= 2.10.0.

I think we should probably insist that one of x1 and y1 is supplied: 
if both are omitted arrows() would give a warning, but segments() 
would not.

On Fri, 2 Oct 2009, Tim Hesterberg wrote:

> I suggest a simple enhancement to segments() and arrows() to
> facilitate drawing horizontal and vertical segments --
> set default values for the second x and y arguments equal to the first set.
> This is handy, especially when the expressions for coordinates are long.
>
> Compare:
>
> Segments:
> < function (x0, y0, x1 = x0, y1 = y0, col = par("fg"), lty = par("lty"),
> ---
>> function (x0, y0, x1, y1, col = par("fg"), lty = par("lty"),
>
> Arrows:
> < function (x0, y0, x1 = x0, y1 = y0, length = 0.25, angle = 30, code = 2,
> ---
>> function (x0, y0, x1, y1, length = 0.25, angle = 30, code = 2,
>
> Tim Hesterberg

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] suggest enhancement to segments and arrows to facilitate horizontal and vertical segments
Prof Brian Ripley