Re: [R] suppress tick labels

2005-12-01 Thread Marc Schwartz (via MN)
On Thu, 2005-12-01 at 18:33 +, Prof Brian Ripley wrote:
> On Thu, 1 Dec 2005, Marc Schwartz (via MN) wrote:
> 
> > On Thu, 2005-12-01 at 10:19 -0600, Paul Roebuck wrote:
> >> On Thu, 1 Dec 2005, Sebastian Leuzinger wrote:
> >>
> >>> is R able to suppress tick labels (not tick marks)? i
> >>> know there is a way around this with axes=F and then
> >>> draw new axes, but it would be easier to suppress them
> >>> in the first place.
> >>
> >> Something wrong with setting them to null string?
> >>
> >>> plot(rnorm(20), xlab="", ylab="")
> >
> > That's not what Sebastian requires.
> >
> > He would like the axis tick marks to be drawn, but without values at the
> > tickmark locations, as opposed to the axis labels.
> >
> > There is not a direct way, but a possible workaround:
> >
> > plot(rnorm(20), col.axis = "white")
> >
> > This sets the tick mark label color to be the same as the background,
> > thus unseen.
> 
> However, if you use col.axis="transparent" or NA, if does directly
> suppress drawing the labels.

Prof. Ripley,

Thanks for point that out, as I note Sundar did as well. I had forgotten
about using 'transparent'.

Thanks,

Marc

__
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


Re: [R] suppress tick labels

2005-12-01 Thread Prof Brian Ripley
On Thu, 1 Dec 2005, Marc Schwartz (via MN) wrote:

> On Thu, 2005-12-01 at 10:19 -0600, Paul Roebuck wrote:
>> On Thu, 1 Dec 2005, Sebastian Leuzinger wrote:
>>
>>> is R able to suppress tick labels (not tick marks)? i
>>> know there is a way around this with axes=F and then
>>> draw new axes, but it would be easier to suppress them
>>> in the first place.
>>
>> Something wrong with setting them to null string?
>>
>>> plot(rnorm(20), xlab="", ylab="")
>
> That's not what Sebastian requires.
>
> He would like the axis tick marks to be drawn, but without values at the
> tickmark locations, as opposed to the axis labels.
>
> There is not a direct way, but a possible workaround:
>
> plot(rnorm(20), col.axis = "white")
>
> This sets the tick mark label color to be the same as the background,
> thus unseen.

However, if you use col.axis="transparent" or NA, if does directly
suppress drawing the labels.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
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, UKFax:  +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


Re: [R] suppress tick labels

2005-12-01 Thread Sundar Dorai-Raj


Sebastian Leuzinger wrote:
> hello,
> is R able to suppress tick labels (not tick marks)? i know there is a way 
> around this with axes=F and then draw new axes, but it would be easier to 
> suppress them in the first place. 

Not really suppressing them, but you could you do the following:

plot(1:10, col.axis = "transparent")

I'm not sure if this solution is device independent.

--sundar

__
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


Re: [R] suppress tick labels

2005-12-01 Thread Berton Gunter
I think the question was about the __tick mark__ labels not the __axis__
labels. The standard way of dealing with this is, as Sebastian said, to draw
customized axes. However, par(lab=c(1,5,5)) reduces the number of tick mark
labels to 2 at the range of the axes, apparently, if that helps.
lab=c(0,5,5)), which one might try to remove the labels, gives an error.

-- Bert Gunter
Genentech Non-Clinical Statistics
South San Francisco, CA
 
"The business of the statistician is to catalyze the scientific learning
process."  - George E. P. Box
 
 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Paul Roebuck
> Sent: Thursday, December 01, 2005 8:19 AM
> To: R Help Mailing List
> Subject: Re: [R] suppress tick labels
> 
> On Thu, 1 Dec 2005, Sebastian Leuzinger wrote:
> 
> > is R able to suppress tick labels (not tick marks)? i
> > know there is a way around this with axes=F and then
> > draw new axes, but it would be easier to suppress them
> > in the first place.
> 
> Something wrong with setting them to null string?
> 
> > plot(rnorm(20), xlab="", ylab="")
> 
> --
> SIGSIG -- signature too long (core dumped)
> 
> __
> 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
>

__
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


Re: [R] suppress tick labels

2005-12-01 Thread Marc Schwartz (via MN)
On Thu, 2005-12-01 at 10:19 -0600, Paul Roebuck wrote:
> On Thu, 1 Dec 2005, Sebastian Leuzinger wrote:
> 
> > is R able to suppress tick labels (not tick marks)? i
> > know there is a way around this with axes=F and then
> > draw new axes, but it would be easier to suppress them
> > in the first place.
> 
> Something wrong with setting them to null string?
> 
> > plot(rnorm(20), xlab="", ylab="")

That's not what Sebastian requires.

He would like the axis tick marks to be drawn, but without values at the
tickmark locations, as opposed to the axis labels.

There is not a direct way, but a possible workaround:

 plot(rnorm(20), col.axis = "white")

This sets the tick mark label color to be the same as the background,
thus unseen.

If you have an alternate background color, adjust the above accordingly.

For plot.default() specifically and functions that behave similarly
internally with respect to the axes, you could use:

  plot(rnorm(20), labels = FALSE)

where the labels argument is passed to the internal axis drawing
function. However, since 'labels' is passed as a "..." argument, you end
up with a warning about 'labels' not being able to be set in a high
level plot function, since it gets passed as a graphical par.

Ultimately however, I do think that this behavior is best controlled by
using "axes = FALSE" and then calling axis(x, labels = FALSE):

 plot(rnorm(20), axes = FALSE)
 axis(1, labels = FALSE)
 axis(2, labels = FALSE)
 box()

Non-standard plot behavior is best done outside of the default plot
function, where you have maximum flexibility.

HTH,

Marc Schwartz

__
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


Re: [R] suppress tick labels

2005-12-01 Thread Jari Oksanen

On 1 Dec 2005, at 17:58, Sebastian Leuzinger wrote:

> hello,
> is R able to suppress tick labels (not tick marks)? i know there is a 
> way
> around this with axes=F and then draw new axes, but it would be easier 
> to
> suppress them in the first place.
>
You mean the numbers below or beside each tick? Looking at ?axis 
suggest that you could  set labels=FALSE to suppress those. It indeed 
seems to work, although you get a warning for each omitted tick label 
(but you must get used to warnings if  you plot()). Try:

plot(rnorm(20), labels=FALSE)

cheers, jari oksanen
--
Jari Oksanen, Oulu, Finland

__
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


Re: [R] suppress tick labels

2005-12-01 Thread Paul Roebuck
On Thu, 1 Dec 2005, Sebastian Leuzinger wrote:

> is R able to suppress tick labels (not tick marks)? i
> know there is a way around this with axes=F and then
> draw new axes, but it would be easier to suppress them
> in the first place.

Something wrong with setting them to null string?

> plot(rnorm(20), xlab="", ylab="")

--
SIGSIG -- signature too long (core dumped)

__
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


[R] suppress tick labels

2005-12-01 Thread Sebastian Leuzinger
hello,
is R able to suppress tick labels (not tick marks)? i know there is a way 
around this with axes=F and then draw new axes, but it would be easier to 
suppress them in the first place. 
-- 

Sebastian Leuzinger
Institute of Botany, University of Basel
Schönbeinstr. 6 CH-4056 Basel
ph0041 (0) 61 2673511
fax   0041 (0) 61 2673504
email [EMAIL PROTECTED] 
web   http://pages.unibas.ch/botschoen/leuzinger

__
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