Reputation: 195
I have a data frame that looks like this.
I want to plot a dot chart for this data, but with my code, the labels are not printed. Also, I want to fill the dots with colours. Is this possible?
The code below shows what I have alredy tried:
lexical_density=read.csv("~/lexical_density_lit_job10.csv", sep=";")
dat=lexical_density
dotchart(dat$Lexical.Density,labels=row.names(dat$TEXTS),
main="Literature Domain",
xlab="Lexical Density")
I want to plot a chart like this
Upvotes: 0
Views: 249
Reputation: 3649
Is this what you are after?
df <- data.frame(T = c('S', 'HT',' MT',' PF', 'PL', 'SF', 'SL'),
LD = c(0.559, 0.576, 0.567, 0.585, 0.567, 0.566, 0.568), stringsAsFactors = FALSE)
dotchart(df$LD, labels = df$T, bg = 'red')
Upvotes: 1