Add colourmap to heatmap
This commit is contained in:
parent
03b356f575
commit
fa23f04fae
1 changed files with 7 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue