开发者

How to order values on a dotplot produced via qplot?

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?

How to order values on a dotplot produced via qplot?


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)

How to order values on a dotplot produced via qplot?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜