I used ggplot
to create a plot:
pl <- ggplot(df, aes(x=xval, y=as.numeric(BS))) +
geom_point(shape=21) +
xlab("Threshold") +
ylab("BS") +
geom_vline(xintercept=df$xval[as.numeric(df$BS) == max(as.numeric(df$BS))],color='red') +
geom_hline(yintercept=max(as.numeric(df$BS)),color='darkblue',linetype=2)
The red line tells me where the maximum of BS
is.
Is there a way to display the x-position and y-position of this value?
It should be something like (for example): P(0.5, 0.8)
.