4
我已經嘗試了很多建議,但沒有一個適合這個特別簡單的例子。我將如何將圖例標題更改爲Sample?ggplot2在這個特定的例子中更改圖例標題
df1 <- data.frame(
Order = c(1,1,2,2),
Tissue = c("Bladder","Pancreas","Bladder","Pancreas"),
Sample = c("WT","WT","Mutant","Mutant"),
Percent = c(94.12,55,5.88,45)
)
ggplot(data = df1, aes(x = Tissue, y = Percent, group = Sample)) +
geom_point(aes(shape=reorder(Sample,Order), fill=reorder(Sample,Order)), size = 6) +
scale_shape_manual(values=c(21,22)) +
scale_fill_manual(values=c("deepskyblue1","yellow"))
謝謝。
嗯,我會。我試圖把它放在每個比例尺線上,但不是兩者都有。非常感謝你! – jmu 2013-03-19 20:54:54