4b2bb6998a
Añade soporte C++ al registry: vendor submodules (glfw, imgui, implot, tracy), sistema de build con CMake y toolchains cross-platform, runner C++ en fn CLI, parser de tests Google Test, y funciones bash para build Linux/Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
25 lines
966 B
C++
25 lines
966 B
C++
#include "viz/heatmap.h"
|
|
#include "implot.h"
|
|
|
|
void heatmap(const char* title, const float* values, int rows, int cols,
|
|
float scale_min, float scale_max) {
|
|
if (ImPlot::BeginPlot(title, ImVec2(-1, 0), ImPlotFlags_NoLegend)) {
|
|
ImPlot::SetupAxes(nullptr, nullptr,
|
|
ImPlotAxisFlags_NoDecorations, ImPlotAxisFlags_NoDecorations);
|
|
ImPlot::PlotHeatmap("##data", values, rows, cols,
|
|
scale_min, scale_max);
|
|
ImPlot::EndPlot();
|
|
}
|
|
}
|
|
|
|
void heatmap(const char* title, const double* values, int rows, int cols,
|
|
double scale_min, double scale_max) {
|
|
if (ImPlot::BeginPlot(title, ImVec2(-1, 0), ImPlotFlags_NoLegend)) {
|
|
ImPlot::SetupAxes(nullptr, nullptr,
|
|
ImPlotAxisFlags_NoDecorations, ImPlotAxisFlags_NoDecorations);
|
|
ImPlot::PlotHeatmap("##data", values, rows, cols,
|
|
scale_min, scale_max);
|
|
ImPlot::EndPlot();
|
|
}
|
|
}
|