I'm plotting ggplot with the geom_text_repel library. The x-axis will be individuals' ID, and the y-axis is continued value.
How can I add label the minimum y value in each step of the x-axis. this is my simple code.
dummy_plot = ggplot(data = summary_mmdata ,
aes(x = factor(type),y = WER_Value,
linetype=factor(WER_Type),
shape = factor(method),
group =factor(WER_Type):factor(method)
)) +
geom_line()+
geom_point()+
scale_y_log10()+
scale_shape_discrete(name = "",
labels=c("Test_Distance"="D1","Test_DistanceV2"="D2T",
"Test_DistanceV2MAV"="D2M","Test_DistanceV2Skip2"="D2S",
"Test_HeatMap"="HM"))+
ylab("AER")+
xlab("")+
geom_text_repel(
data = subset(summary_mmdata, WER_Value == min(WER_Value)),
aes(label = WER_Value),
size = 5,
box.padding = unit(0.35, "lines"),
point.padding = unit(0.3, "lines")
)
dummy_plot
I used the geom_text_repel library. It marks label only the minimum value. I would like all each step in the x-axis. Please advise me.