I am trying to sort the graph by count, but I am not clearly getting how I can. Important thing is that 'topic' is a discrete variable and I'm just showing the count of each topic through the whole data set. This is the code I am using:
ggplot(data = dtd, aes(x = topic)) + geom_bar(fill = "lightblue", colour = "black") + coord_polar()
And this is the error when I try to reorder:
ggplot(data = dtd, aes(x = reorder(topic))) + geom_bar(fill = "lightblue", colour = "black") + coord_polar()
Error in tapply(X = X, INDEX = x, FUN = FUN, ...) :
argument "X" is missing, with no default
It'd be a plus if someone might say how I could fill those sections with a gradient blue shade or something pretty.