0
我试图简单地将一个图例添加到我的奈奎斯特图中,绘制2组数据:1是实验组(约600分),2是数据框使用传递函数计算(〜1000分)将自定义图例添加到ggplot2中的2个数据集
我需要绘制两者并标记它们。目前我有他们都绘制好,但当我尝试使用scale_colour_manual添加标签没有标签出现。另外一种方式来移动这个标签周围将不胜感激!代码如下。
pdf("nyq_2elc.pdf")
nq2 <- ggplot() + geom_point(data = treat, aes(treat$V1,treat$V2), color = "red") +
geom_point(data = circuit, aes(circuit$realTF,circuit$V2), color = "blue") +
xlab("Real Z") + ylab("-Imaginary Z") +
scale_colour_manual(name = 'hell0',
values =c('red'='red','blue'='blue'), labels = c('Treatment','EQ')) +
ggtitle("Nyquist Plot and Equivilent Circuit for 2 Electrode Treatment Setup at 0 Minutes") +
xlim(0,700) + ylim(0,700)
print(nq2)
dev.off()
作品完美!谢谢:D – CHopp