Thanks @FJCC. I got it. When I created tiff file of this graph. X-axis text is chopping in b/w. Do you know how I can prevent this. For image I am using this code:
tiff(file = "difficultyscale.tiff", width = 2000, height = 2000, pointsize = 10, units = "px", res = 600)
dev.off()
Here is code:
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 3.5.3
# Create a dataset
trend <- read.table(header = T, text = 'hedonic Category Percentage
one CATA 31
one OEQ 6
two CATA 0
two OEQ 0
three CATA 17
three OEQ 10
four CATA 13
four OEQ 0
five CATA 2
five OEQ 4
six CATA 6
six OEQ 13
seven CATA 31
seven OEQ 25
eight CATA 0
eight OEQ 25
nine CATA 0
nine OEQ 17')
trend$hedonic <- factor(trend$hedonic, levels = c("one", "two", "three", "four",
"five", "six", "seven", "eight", "nine"))
ggplot(trend, aes(factor(hedonic), Percentage, fill=Category)) +
theme(axis.title.x = element_blank(),
axis.title.y = element_text(size=10, face="bold")) +
geom_bar(stat="identity", position = "dodge", width = 0.5) + scale_fill_manual(values = c("grey", "blue")) +
theme(legend.title = element_blank()) + theme(legend.position = c(.30, .80)) +
theme(axis.text.x = element_text(face="bold", size=6),
axis.text.y = element_text(face="bold", size=10),
legend.margin = margin(t = 0, unit='pt'),
legend.box.margin = margin(0.4,0.4,0.4,0.4,"cm")) +
scale_x_discrete(labels=c("Not at all difficult", "", "",
"", "", "", "", "",
"Extremely difficult")) +
geom_bar(stat = "identity", position = position_dodge(width = 0.5))

Created on 2020-05-19 by the reprex package (v0.3.0)