I generated this with qplot(log10(InDegree), username , data = df, colour = insamples)
.
Is there a way I tell qplot to order the dots from lower to higher value on the y-axis?
The key step is to create a factor of the names with codes in the order of the values.
require(datasets); require(ggplot2)
precip2 = precip[-50]; precip2 = precip2[order(precip2)][1:20]
states = names(precip2); states = factor(states, levels=states)
qplot(precip2, states, data = d)
精彩评论