Re: [R] selective labels display on histogram

2012-04-12 Thread Richard M. Heiberger
Is this what you mean?

x <- rnorm(12)
histogram(x)
histogram(x, scales=list(x=list(at=c(-1, 1), labels=c("minus one", "one"



On Thu, Apr 12, 2012 at 9:28 AM, carol white  wrote:

> Hello,
> Is it possible to selectively display labels on a histogram?
>
> Thanks
>
> Carol
>
>[[alternative HTML version deleted]]
>
> __
> R-help@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.
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] selective labels display on histogram

2012-04-12 Thread Petr PIKAL
Hi

> 
> No, data labels on the histogram bars. labels = T in hist displays all 
data labels.

You could find it probably quicker in documentation.

Plotting command usually creates (invisibly) the object which can be saved 
and changed.

h<-hist(x)

h is list which you can use or modify

for instance this

h.lab <- h$counts
h.lab[seq(2,16,2)]<-NA
hist(x, labels=as.character(h.lab))

prints every second label

Regards
Petr


> 
> thanks
> 
> From: Petr PIKAL 
> To: carol white  
> Cc: "r-h...@stat.math.ethz.ch"  
> Sent: Thursday, April 12, 2012 4:03 PM
> Subject: Re: [R] selective labels display on histogram
> 
> Hi
> 
> > 
> > Hello,
> > Is it possible to selectively display labels on a histogram?
> 
> What labels?
> 
> Like that?
> 
> x<-rnorm(1)
> hist(x)
> hist(x, axes=F, xlab="bla", ylab="ble", main="bleble")
> axis(1, at=c(-4, -1, 1, 4))
> 
> Regards
> Petr
> 
> > 
> > Thanks
> > 
> > Carol
> > 
> >[[alternative HTML version deleted]]
> > 
> > __
> > R-help@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.
> 
>

__
R-help@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.


Re: [R] selective labels display on histogram

2012-04-12 Thread carol white
No, data labels on the histogram bars. labels = T in hist displays all data 
labels.

thanks




 From: Petr PIKAL 

Cc: "r-h...@stat.math.ethz.ch"  
Sent: Thursday, April 12, 2012 4:03 PM
Subject: Re: [R] selective labels display on histogram

Hi

> 
> Hello,
> Is it possible to selectively display labels on a histogram?

What labels?

Like that?

x<-rnorm(1)
hist(x)
hist(x, axes=F, xlab="bla", ylab="ble", main="bleble")
axis(1, at=c(-4, -1, 1, 4))

Regards
Petr

> 
> Thanks
> 
> Carol
> 
>    [[alternative HTML version deleted]]
> 
> __
> R-help@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.
[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] selective labels display on histogram

2012-04-12 Thread Petr PIKAL
Hi

> 
> Hello,
> Is it possible to selectively display labels on a histogram?

What labels?

Like that?

x<-rnorm(1)
hist(x)
hist(x, axes=F, xlab="bla", ylab="ble", main="bleble")
axis(1, at=c(-4, -1, 1, 4))

Regards
Petr

> 
> Thanks
> 
> Carol
> 
>[[alternative HTML version deleted]]
> 
> __
> R-help@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.

__
R-help@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.


[R] selective labels display on histogram

2012-04-12 Thread carol white
Hello,
Is it possible to selectively display labels on a histogram?

Thanks

Carol

[[alternative HTML version deleted]]

__
R-help@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.