diff --git a/src/heatmap.rs b/src/heatmap.rs index 2a023b7..b6f14d9 100644 --- a/src/heatmap.rs +++ b/src/heatmap.rs @@ -1,4 +1,7 @@ -use sys::{ImPlotHeatmapFlags, ImPlotHeatmapFlags__ImPlotHeatmapFlags_ColMajor}; +use sys::{ + ImPlotColormap__ImPlotColormap_Viridis, ImPlotHeatmapFlags, + ImPlotHeatmapFlags__ImPlotHeatmapFlags_ColMajor, +}; use crate::sys; use std::ffi::CString; @@ -24,14 +27,15 @@ impl PlotHeatmap { } unsafe { + sys::ImPlot_PushColormap_PlotColormap(ImPlotColormap__ImPlotColormap_Viridis as i32); sys::ImPlot_PlotHeatmap_doublePtr( self.label.as_ptr() as *const c_char, x.as_ptr(), rows, cols, 0.0, - 0.0, - "\0".as_ptr() as *const c_char, + 1.0, + "%.0f\0".as_ptr() as *const c_char, ImPlotPoint { x: 0f64, y: rows as f64,