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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.