R语言绘制直角坐标系调整效果图4
library(ggplot2)
library(RColorBrewer)
library(reshape2)
df<-read.csv("MappingAnalysis_Data.csv", header = TRUE)
#--------------------------------------color+shape---------------------------
ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#191970","#F5FFFA","#FFE4E1","#FFE4B5"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

#--------------------------------------color+shape---------------------------
ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#FFDEAD","#000080","#FDF5E6","#808000"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

#--------------------------------------color+shape---------------------------
ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#6B8E23","#FFA500","#FF4500","#DA70D6"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#EEE8AA","#98FB98","#AFEEEE","#DB7093"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#FFEFD5","#FFDAB9","#CD853F","#FFC0CB"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#DDA0DD","#B0E0E6","#800080","#FF0000"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#BC8F8F","#4169E1","#8B4513","#FA8072"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#F4A460","#2E8B57","#FFF5EE","#A0522D"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#C0C0C0","#87CEEB","#6A5ACD","#708090"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#FFFAFA","#00FF7F","#4682B4","#D2B48C"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#008080","#D8BFD8","#FF6347","#40E0D0"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

ggplot(data=df, aes(x=Time,y=value,fill=variable,shape=variable)) +
geom_line()+
geom_point(size=4,colour="black") +
scale_fill_manual(values=c("#EE82EE","#F5DEB3","#FFFFFF","#F5F5F5"))+
scale_shape_manual(values=c(21,22,23,24))+
theme_classic()+
theme(
text=element_text(size=14,color="black"),
plot.title=element_text(size=14,family="myfont",face="bold.italic",hjust=.5,color="black"),
legend.background = element_blank(),
legend.position=c(0.2,0.8)
)

参考文献:https://blog.csdn.net/m0_38127487/article/details/127945927?spm=1001.2014.3001.5501
开发工具:RStudio和Alt+A截屏工具
- 点赞
- 收藏
- 关注作者
评论(0)