#include "viz/histogram.h" #include "implot.h" void histogram(const char* title, const float* values, int count, int bins) { if (ImPlot::BeginPlot(title, ImVec2(-1, 0))) { int b = (bins > 0) ? bins : ImPlotBin_Sturges; ImPlot::PlotHistogram("##data", values, count, b); ImPlot::EndPlot(); } } void histogram(const char* title, const double* values, int count, int bins) { if (ImPlot::BeginPlot(title, ImVec2(-1, 0))) { int b = (bins > 0) ? bins : ImPlotBin_Sturges; ImPlot::PlotHistogram("##data", values, count, b); ImPlot::EndPlot(); } }