diff --git a/implot.cpp b/implot.cpp index e18e71d..7958ad3 100644 --- a/implot.cpp +++ b/implot.cpp @@ -3692,7 +3692,7 @@ void Annotation(double x, double y, const ImVec4& col, const ImVec2& offset, boo char x_buff[IMPLOT_LABEL_MAX_SIZE]; char y_buff[IMPLOT_LABEL_MAX_SIZE]; ImPlotAxis& x_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentX]; - ImPlotAxis& y_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentX]; + ImPlotAxis& y_axis = gp.CurrentPlot->Axes[gp.CurrentPlot->CurrentY]; LabelAxisValue(x_axis, x, x_buff, sizeof(x_buff), round); LabelAxisValue(y_axis, y, y_buff, sizeof(y_buff), round); Annotation(x,y,col,offset,clamp,"%s, %s",x_buff,y_buff);