[R] Line in hist count

bgnumis bgnum bgnumis at gmail.com
Sun Sep 27 23:51:23 CEST 2015


Hi, all

I have discovered that with abline(h=dataf,col="red") can add a line as I
want in this plot

fhist<-hist(f,plot=FALSE)
par(mar=c(6,0,6,6))
barplot(fhist$counts/ sum(fhist$counts),axes=FALSE,
space=0,horiz=TRUE,col="lightgray")
grid()
title("Marginal Distribution CDS vs. Ibex",font=4)
abline(h=dataf,col="red")

The thing is:

¿How can I display the associated fhist$counts/ sum(fhist$counts on the
last value of f?

2015-09-26 23:31 GMT+02:00 bgnumis bgnum <bgnumis at gmail.com>:

> Hi all,
>
> Several time ago I used to work with R, now I´m returning to study and
> work and searching old file I see that I used this code:
>
>
> gfhist<-hist(gf,plot=FALSE)
>
> par(mar=c(6,0,6,6))
>
> barplot(gfhist$counts,axes=FALSE, space=0,horiz=TRUE,col="lightgray")
>
> grid()
>
> title("Marginal Distribution Lagged",font=4)
>
> The thing is I would line to plot a bar (horizontal and thing bar that
> will be placed on the last gf data but on the barplot
>
> ¿Do you think is it possible? gf is a matrix.
>
>
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list