[R] selective labels display on histogram
Petr PIKAL
petr.pikal at precheza.cz
Thu Apr 12 17:50:29 CEST 2012
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 <petr.pikal at precheza.cz>
> To: carol white <wht_crl at yahoo.com>
> Cc: "r-help at stat.math.ethz.ch" <r-help at 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(10000)
> 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 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.
>
>
More information about the R-help
mailing list