1
와 기하 구조를 추가 이것은 논쟁의 여지가있는이 질문에 대한 후속 조치 :자체의 스케일과 전설
Add legend to ggplot2 line plot
Add vline to existing plot and have it appear in ggplot2 legend?
내가 자신의 독립을했을 그 음모에 기하 구조를 추가 할 데이터, 축척 및 범례 요소가 포함됩니다.
이것은 그래픽 원리의 문법 중 일부를 위반할 수 있지만 실제로는 전설에 나타나는 수직선 또는 수평선, 단일 점, 화살표 등의 요소를 원합니다.
다른 기하 구조 매핑에서 이미 눈금자가 사용되는 경우 어려움이 추가되는 것처럼 보입니다. 현재 vline와 연관 전설의 선 종류를 누락 생산
p<-qplot(data=iris, x=Petal.Width,
y=Sepal.Width,
colour=Species,
shape=as.factor(round(Petal.Length)),
linetype=as.factor(round(Sepal.Length)),
geom=c("line", "point"))
p<-p+geom_vline(xintercept=0.75, aes(linetype="Setosa vs Versicolor"))
p<-p+geom_vline(xintercept=1.75, aes(linetype="Versicolor vs Virginica"))
print(p)
:
여기는 조리개를 사용하므로 꽤 예가 아니다.