From 220f5c9ab43995fb89652b079969fffca3ea05db Mon Sep 17 00:00:00 2001 From: ozlb Date: Fri, 29 Jul 2022 05:41:21 +0200 Subject: [PATCH] Annotation Label y axis fix (#384) --- implot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);