epezent / implot

Immediate Mode Plotting
MIT License
4.55k stars 503 forks source link

Fix EndPlot() not deducing auto color for ImPlotCol_PlotBorder #517

Closed elvissteinjr closed 10 months ago

elvissteinjr commented 10 months ago

EndPlot() currently accesses the style color field directly when deciding whether to render the border and behaves wrongly if ImPlotCol_PlotBorder is set to IMPLOT_AUTO_COL, never rendering it. Despite being documented to defaulting to ImGuiCol_Border's value.

Of course the easy fix on the application end is to set ImPlotCol_PlotBorder explicitly. This change may also be considered as a breaking change as it will start adding borders to plots that previously had none with default styling. Changing the documentation to reflect the current behavior could be an alternative if preferred.

epezent commented 10 months ago

Thanks for the fix!