1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-22 18:28:53 -05:00

Annotation Label y axis fix (#384)

This commit is contained in:
ozlb 2022-07-29 05:41:21 +02:00 committed by GitHub
parent 7a470b2e17
commit 220f5c9ab4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);