Re: [R] in axis() suppressing axis line but keeping tick marks

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon, 28 Jul 2008 17:28:03 +0100 (BST)

I'm pretty sure that this is not Paul's design and he usually doesn't want to touch base graphics.

I've added arguments lwd.ticks and col.ticks in R-devel. The simplest way to suppress the axis line become axis(..., lwd=0, lwd.ticks=1).

On Mon, 16 Jun 2008, Peter Dalgaard wrote:

> Andrew Yee wrote:
>> I've been trying to figure out a parameter that will let you separately
>> adjust the parameters for the axis line from the tick mark.
>>
>> In the following example, I would like to suppress the axis line, but keep
>> the tick marks.
>>
> The source code is the ultimate reference. We have in do_axis in
> src/main/plot.c:
>
> if (doticks) {
> gpptr(dd)->col = col;/*was fg */
> GLine(axis_low, axis_base, axis_high, axis_base, NFC, dd);
> for (i = 0; i < n; i++) {
> x = REAL(at)[i];
> if (low <= x && x <= high) {
> x = GConvertX(x, USER, NFC, dd);
> GLine(x, axis_base, x, axis_tick, NFC, dd);
> }
> }
> }
>
> and, as you see, there is no way the line parameters can change between the
> GLine calls, no hope of finding a magical par() setting. So I'm afraid you
> have to bite the bullet, do the relevant coordinate calculations, and use
> segments() do draw the ticks. (Or try convincing Paul Murrell to change the
> design, but that takes longer...).
>
> --
> O__ ---- Peter Dalgaard ุster Farimagsgade 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard_at_biostat.ku.dk) FAX: (+45) 35327907
>
> ______________________________________________
> R-help_at_r-project.org 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.
>

-- 
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


______________________________________________ R-help_at_r-project.org 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 Mon 28 Jul 2008 - 17:20:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Jul 2008 - 17:32:42 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.

list of date sections of archive