Reputation: 65
I have a simple question. I need make a bar plot for c using a limit (0.4 to 1.0) and I need all the names in the x-axis(1- 100).
name=seq(1:1000)
c=runif(1000,0.4,1.0)
c=round(c,2)
How can I do that? I tried just
barplot(c,names.arg=name, ylim=c(0.4,1.0))
Thank you
Upvotes: 0
Views: 263
Reputation: 173517
For an example of how to make the x axis labels at least visible, while restricting the y axis, consider doing something like this:
barplot(c - 0.4,names.arg=name,axes = FALSE)
axis(side = 2,at = seq(0,0.6,by = 0.2),labels = as.character(seq(0.4,1.0,by = 0.2)))
But note that:
c
, it's confusing.You should rethink whether a visualization like this is really meaningful.
Upvotes: 1