1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-10-09 23:57:26 -04:00

colormaps

This commit is contained in:
Evan Pezent 2020-06-02 12:35:20 -05:00
parent 356e604bd2
commit 663738452f

View File

@ -341,7 +341,7 @@ void ShowDemoWindow(bool* p_open) {
ImGui::LabelText("##Colormap Index", cmap_names[map]); ImGui::LabelText("##Colormap Index", cmap_names[map]);
ImGui::DragFloatRange2("Scale (Left Only)",&scale_min,&scale_max,0.01f); ImGui::DragFloatRange2("Scale (Left Only)",&scale_min,&scale_max,0.01f);
static ImPlotAxisFlags axes_flags = ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax; static ImPlotAxisFlags axes_flags = ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax;
if (ImPlot::BeginPlot("##Heatmap1",NULL,NULL,ImVec2(250,250),0,axes_flags,axes_flags)) { if (ImPlot::BeginPlot("##Heatmap1",NULL,NULL,ImVec2(250,250))) {
ImPlot::SetColormap(map); ImPlot::SetColormap(map);
ImPlot::PlotHeatmap("heat",values1[0],7,7,scale_min,scale_max); ImPlot::PlotHeatmap("heat",values1[0],7,7,scale_min,scale_max);
ImPlot::EndPlot(); ImPlot::EndPlot();