From 71e38ad7704ae6925f3bbcdd08e8681c747c2dd0 Mon Sep 17 00:00:00 2001 From: Evan Pezent Date: Mon, 1 Jun 2020 17:33:01 -0500 Subject: [PATCH] start heatmap dev --- implot.cpp | 10 ++++++++++ implot.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/implot.cpp b/implot.cpp index 2b042ff..645de36 100644 --- a/implot.cpp +++ b/implot.cpp @@ -2822,6 +2822,16 @@ void PlotPieChart(const char** label_ids, double* values, int count, double x, d return PlotPieChartEx(label_ids, values, count, x, y, radius, show_percents, angle0); } +//----------------------------------------------------------------------------- +// PLOT HEATMAP +//----------------------------------------------------------------------------- + +void PlotHeatmap(const char* label_id, const double* values, int rows, int cols, double scale_min, double scale_max, bool show_labels) { + ImPlotItem* item = RegisterItem(label_id); + if (!item->Show) + return; +} + //----------------------------------------------------------------------------- // PLOT DIGITAL //----------------------------------------------------------------------------- diff --git a/implot.h b/implot.h index 0e48723..c4abdbf 100644 --- a/implot.h +++ b/implot.h @@ -226,6 +226,9 @@ void PlotErrorBars(const char* label_id, const double* xs, const double* ys, con void PlotPieChart(const char** label_ids, float* values, int count, float x, float y, float radius, bool show_percents = true, float angle0 = 90); void PlotPieChart(const char** label_ids, double* values, int count, double x, double y, double radius, bool show_percents = true, double angle0 = 90); +// Plots a 2D heatmap chart. +void PlotHeatmap(const char* label_id, const double* values, int rows, int cols, double scale_min, double scale_max, bool show_labels = true); + // Plots digital data. void PlotDigital(const char* label_id, const float* xs, const float* ys, int count, int offset = 0, int stride = sizeof(float)); void PlotDigital(const char* label_id, const double* xs, const double* ys, int count, int offset = 0, int stride = sizeof(double));