plot - R barplot with y-axis greater than zero -


i want plot data in r.

the table like:

name     count        110 b        120 c        130 

i want plot table each column name , bar height count. want zoom important part 100 150 because values in count greater 100.

i think set y-axis base 100 in case. hope can help.

try

m1 <- matrix(df1[,2], ncol=3, dimnames=list(null, df1[,1])) barplot(m1, ylim=c(100,150), beside=true, xpd=false) 

enter image description here or

library(ggplot2) ggplot(df1, aes(x=name, y=count))+                geom_bar(stat='identity')+                coord_cartesian(ylim=c(100,150)) +                theme_bw() +                xlab(null) +                ylab(null) 

enter image description here

data

df1 <- structure(list(name = c("a", "b", "c"), count = c(110l, 120l,  130l)), .names = c("name", "count"), class = "data.frame", row.names = c(na, -3l)) 

Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -