Reputation: 103
I want to plot the values of an array in R:
a <- c( 276, 1591, 2367, 3441, 82, 2690, 106, 277, 172, 190, 26, 18, 32, 12, 12, 17)
in a form like an histogram, like this:
hist(a, breaks="Sturge", col="grey", labels = T,main="My array")
but with its value as y, instead of the frequencies.
So what I want is a simple plot:
plot(a, type = 'h')
but with a layout like the first picture (bars instead of lines).
Upvotes: 0
Views: 5194