I want to indicate a data point only on the Result line chart of a graph but not for the other line charts. Want lines and show data points only for the result category but not for other category. I want all other line without data points. Any help how I can tweak my code in R?!
Please check the image. I marked with yellow colours.
myColors = c("-1SD"="#00FF00", "-2SD"="#FFFF00", "-3SD"="#FF0000", "+1SD"="#00FF00",
"+2SD"="#FFFF00", "+3SD"="#FF0000", "ExpectedValue"="#808080", "Result"="#1D376C")
myLineType = c("-1SD"="dashed", "-2SD"="twodash", "-3SD"="longdash", "+1SD"="dashed",
"+2SD"="twodash", "+3SD"="longdash", "ExpectedValue"="dotted", "Result"="dotdash")
g<-ggplot(data=Values,aes(x=DateSampleID, y=Value, a=SampleID, b=Result, group=Category, label=Category)) +
geom_line(aes(linetype = Category, color= Category), size=0.6, alpha=0.8)+
labs(x = "DateSampleID",
y = "Result") +
theme_minimal(base_size = 12, base_family ="Segoe UI Bold")+
theme(axis.text.x = element_blank(),
axis.ticks.x = element_blank(),
axis.title.x = element_text(family="Segoe UI",size=12, face="bold", colour = "black"),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
legend.title = element_blank(),
axis.text.y = element_text(family="Segoe UI",size=12,face="bold", colour="black"),
axis.title.y = element_text(family="Segoe UI",size=12,face="bold", colour="black"),
legend.text = element_text(family="Segoe UI",size=10,face="bold", colour="black"))+
scale_linetype_manual(values = myLineType)+
scale_color_manual(values = myColors)