Re: [R] arrows and points for error bars

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 20 Oct 2006 - 13:49:56 GMT

It would be very helpful to have a reproducible example, including the OS and graphics device used.

For example, this may only happen with certain values of 'pch' -- e.g. some graphics devices (pdf is one) plot circles using completely different code from squares. And we frequently see reports of problems with R graphics where the bug is in the viewer software or the including application (Word being notorious for mis-rendering WMF files).

On Fri, 20 Oct 2006, Peter Dalgaard wrote:

> "Simon Pickett" <S.Pickett@exeter.ac.uk> writes:
>
>> Hello everyone,
>> I have successfully made an error bar graph using the points() command
>> with the arrows() command to maually add on the standard errors.
>>
>> However, one slightly annoying feature of using this method is that the
>> points dont line up exactly with the arrows (if you look carefully the
>> points are never perfectly in the centre of the arrow), even when you move
>> the arrows around in an attempt to correct this.
>
> Is this a pixelization issue? If the line is an odd number of pixels
> wide and the point is an even number of pixels across, then there is
> just no way to line them up. It should go away with increased
> resolution, e.g. when plotting to pdf() and printing on a laser
> printer.
>
>> Secondly I cant seem to force the points to appear on top of the arrows
>> i.e. with the arrows behind the points. Uing ADD=TRUE to either command
>> wont work.
>
> Plot the points last and use a filled symbol, or pch %in% 21:25 with
> bg="white". (example(points) is generally helpful in these matters)
>
>> Does anyone have any solutions to this problem, or maybe even a different
>> way of making error plots?
>>
>> Sorry if this seems a bit pedantic, but it would be great if I could
>> resolve this problem and so enable me to use R for publication standard
>> graphs...
>>
>> Thanks everyone :-)
>
>
>
>

-- 
Brian D. Ripley,                  ripley@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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri Oct 20 23:58:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 20 Oct 2006 - 17:30:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.