-1

How can I to turn vertically the names "fast" and "slow" through 'barplot()' ?

barplot(table(mode))

enter image description here

Jaap
  • 81,064
  • 34
  • 182
  • 193
Dmitry
  • 87
  • 1
  • 7
  • 2
    dude, you had a totally different question >_ – AK88 Jul 04 '17 at 11:19
  • 2
    Please [edit] your question to show [the code you have so far](http://whathaveyoutried.com). You should include at least an outline (but preferably a [mcve]) of the code that you are having problems with, then we can try to help with the specific problem. You should also read [ask]. – Toby Speight Jul 04 '17 at 11:25
  • AK88, there was an old question that I mistakenly published. Sorry – Dmitry Jul 04 '17 at 11:25

3 Answers3

0
x <- c("1.3.43.33", "2.2.43.33", "1.3.43.33", "66.3.43.33")
df = as.data.frame(table(x))
df

library(ggplot2)
ggplot(df, aes(x = x, y = Freq))+
  geom_bar(stat = "identity")
AK88
  • 2,946
  • 2
  • 12
  • 31
0

Just write :

barplot(table(x), las = 2)

where x is your vector of data :

x <- c("1.3.43.33", "2.2.43.33", "1.3.43.33", "66.3.43.33")
Mbr Mbr
  • 734
  • 6
  • 23
0

add the "las" parameter to change the orientation of the labels

barplot(table(mode), las=2)
ronomal
  • 136
  • 8