63#define IMPLOT_VERSION "0.17"
67#define IMPLOT_AUTO_COL ImVec4(0,0,0,-1)
69#define IMPLOT_TMP template <typename T> IMPLOT_API
80typedef int ImPlotFlags;
81typedef int ImPlotAxisFlags;
82typedef int ImPlotSubplotFlags;
83typedef int ImPlotLegendFlags;
84typedef int ImPlotMouseTextFlags;
85typedef int ImPlotDragToolFlags;
86typedef int ImPlotColormapScaleFlags;
88typedef int ImPlotItemFlags;
89typedef int ImPlotLineFlags;
90typedef int ImPlotScatterFlags;
91typedef int ImPlotStairsFlags;
92typedef int ImPlotShadedFlags;
93typedef int ImPlotBarsFlags;
94typedef int ImPlotBarGroupsFlags;
95typedef int ImPlotErrorBarsFlags;
96typedef int ImPlotStemsFlags;
97typedef int ImPlotInfLinesFlags;
98typedef int ImPlotPieChartFlags;
99typedef int ImPlotHeatmapFlags;
100typedef int ImPlotHistogramFlags;
101typedef int ImPlotDigitalFlags;
102typedef int ImPlotImageFlags;
103typedef int ImPlotTextFlags;
104typedef int ImPlotDummyFlags;
106typedef int ImPlotCond;
107typedef int ImPlotCol;
108typedef int ImPlotStyleVar;
109typedef int ImPlotScale;
110typedef int ImPlotMarker;
111typedef int ImPlotColormap;
112typedef int ImPlotLocation;
113typedef int ImPlotBin;
131 ImPlotFlags_None = 0,
132 ImPlotFlags_NoTitle = 1 << 0,
133 ImPlotFlags_NoLegend = 1 << 1,
134 ImPlotFlags_NoMouseText = 1 << 2,
135 ImPlotFlags_NoInputs = 1 << 3,
136 ImPlotFlags_NoMenus = 1 << 4,
137 ImPlotFlags_NoBoxSelect = 1 << 5,
138 ImPlotFlags_NoFrame = 1 << 6,
139 ImPlotFlags_Equal = 1 << 7,
140 ImPlotFlags_Crosshairs = 1 << 8,
141 ImPlotFlags_CanvasOnly = ImPlotFlags_NoTitle | ImPlotFlags_NoLegend | ImPlotFlags_NoMenus | ImPlotFlags_NoBoxSelect | ImPlotFlags_NoMouseText
145enum ImPlotAxisFlags_ {
146 ImPlotAxisFlags_None = 0,
147 ImPlotAxisFlags_NoLabel = 1 << 0,
148 ImPlotAxisFlags_NoGridLines = 1 << 1,
149 ImPlotAxisFlags_NoTickMarks = 1 << 2,
150 ImPlotAxisFlags_NoTickLabels = 1 << 3,
151 ImPlotAxisFlags_NoInitialFit = 1 << 4,
152 ImPlotAxisFlags_NoMenus = 1 << 5,
153 ImPlotAxisFlags_NoSideSwitch = 1 << 6,
154 ImPlotAxisFlags_NoHighlight = 1 << 7,
155 ImPlotAxisFlags_Opposite = 1 << 8,
156 ImPlotAxisFlags_Foreground = 1 << 9,
157 ImPlotAxisFlags_Invert = 1 << 10,
158 ImPlotAxisFlags_AutoFit = 1 << 11,
159 ImPlotAxisFlags_RangeFit = 1 << 12,
160 ImPlotAxisFlags_PanStretch = 1 << 13,
161 ImPlotAxisFlags_LockMin = 1 << 14,
162 ImPlotAxisFlags_LockMax = 1 << 15,
163 ImPlotAxisFlags_Lock = ImPlotAxisFlags_LockMin | ImPlotAxisFlags_LockMax,
164 ImPlotAxisFlags_NoDecorations = ImPlotAxisFlags_NoLabel | ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_NoTickMarks | ImPlotAxisFlags_NoTickLabels,
165 ImPlotAxisFlags_AuxDefault = ImPlotAxisFlags_NoGridLines | ImPlotAxisFlags_Opposite
169enum ImPlotSubplotFlags_ {
170 ImPlotSubplotFlags_None = 0,
171 ImPlotSubplotFlags_NoTitle = 1 << 0,
172 ImPlotSubplotFlags_NoLegend = 1 << 1,
173 ImPlotSubplotFlags_NoMenus = 1 << 2,
174 ImPlotSubplotFlags_NoResize = 1 << 3,
175 ImPlotSubplotFlags_NoAlign = 1 << 4,
176 ImPlotSubplotFlags_ShareItems = 1 << 5,
177 ImPlotSubplotFlags_LinkRows = 1 << 6,
178 ImPlotSubplotFlags_LinkCols = 1 << 7,
179 ImPlotSubplotFlags_LinkAllX = 1 << 8,
180 ImPlotSubplotFlags_LinkAllY = 1 << 9,
181 ImPlotSubplotFlags_ColMajor = 1 << 10
185enum ImPlotLegendFlags_ {
186 ImPlotLegendFlags_None = 0,
187 ImPlotLegendFlags_NoButtons = 1 << 0,
188 ImPlotLegendFlags_NoHighlightItem = 1 << 1,
189 ImPlotLegendFlags_NoHighlightAxis = 1 << 2,
190 ImPlotLegendFlags_NoMenus = 1 << 3,
191 ImPlotLegendFlags_Outside = 1 << 4,
192 ImPlotLegendFlags_Horizontal = 1 << 5,
193 ImPlotLegendFlags_Sort = 1 << 6,
197enum ImPlotMouseTextFlags_ {
198 ImPlotMouseTextFlags_None = 0,
199 ImPlotMouseTextFlags_NoAuxAxes = 1 << 0,
200 ImPlotMouseTextFlags_NoFormat = 1 << 1,
201 ImPlotMouseTextFlags_ShowAlways = 1 << 2,
205enum ImPlotDragToolFlags_ {
206 ImPlotDragToolFlags_None = 0,
207 ImPlotDragToolFlags_NoCursors = 1 << 0,
208 ImPlotDragToolFlags_NoFit = 1 << 1,
209 ImPlotDragToolFlags_NoInputs = 1 << 2,
210 ImPlotDragToolFlags_Delayed = 1 << 3,
214enum ImPlotColormapScaleFlags_ {
215 ImPlotColormapScaleFlags_None = 0,
216 ImPlotColormapScaleFlags_NoLabel = 1 << 0,
217 ImPlotColormapScaleFlags_Opposite = 1 << 1,
218 ImPlotColormapScaleFlags_Invert = 1 << 2,
222enum ImPlotItemFlags_ {
223 ImPlotItemFlags_None = 0,
224 ImPlotItemFlags_NoLegend = 1 << 0,
225 ImPlotItemFlags_NoFit = 1 << 1,
229enum ImPlotLineFlags_ {
230 ImPlotLineFlags_None = 0,
231 ImPlotLineFlags_Segments = 1 << 10,
232 ImPlotLineFlags_Loop = 1 << 11,
233 ImPlotLineFlags_SkipNaN = 1 << 12,
234 ImPlotLineFlags_NoClip = 1 << 13,
235 ImPlotLineFlags_Shaded = 1 << 14,
239enum ImPlotScatterFlags_ {
240 ImPlotScatterFlags_None = 0,
241 ImPlotScatterFlags_NoClip = 1 << 10,
245enum ImPlotStairsFlags_ {
246 ImPlotStairsFlags_None = 0,
247 ImPlotStairsFlags_PreStep = 1 << 10,
248 ImPlotStairsFlags_Shaded = 1 << 11
252enum ImPlotShadedFlags_ {
253 ImPlotShadedFlags_None = 0
257enum ImPlotBarsFlags_ {
258 ImPlotBarsFlags_None = 0,
259 ImPlotBarsFlags_Horizontal = 1 << 10,
263enum ImPlotBarGroupsFlags_ {
264 ImPlotBarGroupsFlags_None = 0,
265 ImPlotBarGroupsFlags_Horizontal = 1 << 10,
266 ImPlotBarGroupsFlags_Stacked = 1 << 11,
270enum ImPlotErrorBarsFlags_ {
271 ImPlotErrorBarsFlags_None = 0,
272 ImPlotErrorBarsFlags_Horizontal = 1 << 10,
276enum ImPlotStemsFlags_ {
277 ImPlotStemsFlags_None = 0,
278 ImPlotStemsFlags_Horizontal = 1 << 10,
282enum ImPlotInfLinesFlags_ {
283 ImPlotInfLinesFlags_None = 0,
284 ImPlotInfLinesFlags_Horizontal = 1 << 10
288enum ImPlotPieChartFlags_ {
289 ImPlotPieChartFlags_None = 0,
290 ImPlotPieChartFlags_Normalize = 1 << 10,
291 ImPlotPieChartFlags_IgnoreHidden = 1 << 11
295enum ImPlotHeatmapFlags_ {
296 ImPlotHeatmapFlags_None = 0,
297 ImPlotHeatmapFlags_ColMajor = 1 << 10,
301enum ImPlotHistogramFlags_ {
302 ImPlotHistogramFlags_None = 0,
303 ImPlotHistogramFlags_Horizontal = 1 << 10,
304 ImPlotHistogramFlags_Cumulative = 1 << 11,
305 ImPlotHistogramFlags_Density = 1 << 12,
306 ImPlotHistogramFlags_NoOutliers = 1 << 13,
307 ImPlotHistogramFlags_ColMajor = 1 << 14
311enum ImPlotDigitalFlags_ {
312 ImPlotDigitalFlags_None = 0
316enum ImPlotImageFlags_ {
317 ImPlotImageFlags_None = 0
321enum ImPlotTextFlags_ {
322 ImPlotTextFlags_None = 0,
323 ImPlotTextFlags_Vertical = 1 << 10
327enum ImPlotDummyFlags_ {
328 ImPlotDummyFlags_None = 0
334 ImPlotCond_None = ImGuiCond_None,
335 ImPlotCond_Always = ImGuiCond_Always,
336 ImPlotCond_Once = ImGuiCond_Once,
344 ImPlotCol_MarkerOutline,
345 ImPlotCol_MarkerFill,
350 ImPlotCol_PlotBorder,
352 ImPlotCol_LegendBorder,
353 ImPlotCol_LegendText,
360 ImPlotCol_AxisBgHovered,
361 ImPlotCol_AxisBgActive,
363 ImPlotCol_Crosshairs,
368enum ImPlotStyleVar_ {
370 ImPlotStyleVar_LineWeight,
371 ImPlotStyleVar_Marker,
372 ImPlotStyleVar_MarkerSize,
373 ImPlotStyleVar_MarkerWeight,
374 ImPlotStyleVar_FillAlpha,
375 ImPlotStyleVar_ErrorBarSize,
376 ImPlotStyleVar_ErrorBarWeight,
377 ImPlotStyleVar_DigitalBitHeight,
378 ImPlotStyleVar_DigitalBitGap,
380 ImPlotStyleVar_PlotBorderSize,
381 ImPlotStyleVar_MinorAlpha,
382 ImPlotStyleVar_MajorTickLen,
383 ImPlotStyleVar_MinorTickLen,
384 ImPlotStyleVar_MajorTickSize,
385 ImPlotStyleVar_MinorTickSize,
386 ImPlotStyleVar_MajorGridSize,
387 ImPlotStyleVar_MinorGridSize,
388 ImPlotStyleVar_PlotPadding,
389 ImPlotStyleVar_LabelPadding,
390 ImPlotStyleVar_LegendPadding,
391 ImPlotStyleVar_LegendInnerPadding,
392 ImPlotStyleVar_LegendSpacing,
393 ImPlotStyleVar_MousePosPadding,
394 ImPlotStyleVar_AnnotationPadding,
395 ImPlotStyleVar_FitPadding,
396 ImPlotStyleVar_PlotDefaultSize,
397 ImPlotStyleVar_PlotMinSize,
403 ImPlotScale_Linear = 0,
411 ImPlotMarker_None = -1,
414 ImPlotMarker_Diamond,
421 ImPlotMarker_Asterisk,
426enum ImPlotColormap_ {
427 ImPlotColormap_Deep = 0,
428 ImPlotColormap_Dark = 1,
429 ImPlotColormap_Pastel = 2,
430 ImPlotColormap_Paired = 3,
431 ImPlotColormap_Viridis = 4,
432 ImPlotColormap_Plasma = 5,
433 ImPlotColormap_Hot = 6,
434 ImPlotColormap_Cool = 7,
435 ImPlotColormap_Pink = 8,
436 ImPlotColormap_Jet = 9,
437 ImPlotColormap_Twilight = 10,
438 ImPlotColormap_RdBu = 11,
439 ImPlotColormap_BrBG = 12,
440 ImPlotColormap_PiYG = 13,
441 ImPlotColormap_Spectral = 14,
442 ImPlotColormap_Greys = 15,
446enum ImPlotLocation_ {
447 ImPlotLocation_Center = 0,
448 ImPlotLocation_North = 1 << 0,
449 ImPlotLocation_South = 1 << 1,
450 ImPlotLocation_West = 1 << 2,
451 ImPlotLocation_East = 1 << 3,
452 ImPlotLocation_NorthWest = ImPlotLocation_North | ImPlotLocation_West,
453 ImPlotLocation_NorthEast = ImPlotLocation_North | ImPlotLocation_East,
454 ImPlotLocation_SouthWest = ImPlotLocation_South | ImPlotLocation_West,
455 ImPlotLocation_SouthEast = ImPlotLocation_South | ImPlotLocation_East
461 ImPlotBin_Sturges = -2,
463 ImPlotBin_Scott = -4,
467IM_MSVC_RUNTIME_CHECKS_OFF
471 constexpr ImPlotPoint(
double _x,
double _y) : x(_x), y(_y) { }
473 double& operator[] (
size_t idx) { IM_ASSERT(idx == 0 || idx == 1);
return ((
double*)(
void*)(
char*)
this)[idx]; }
474 double operator[] (
size_t idx)
const { IM_ASSERT(idx == 0 || idx == 1);
return ((
const double*)(
const void*)(
const char*)
this)[idx]; }
475#ifdef IMPLOT_POINT_CLASS_EXTRA
476 IMPLOT_POINT_CLASS_EXTRA
480IM_MSVC_RUNTIME_CHECKS_RESTORE
486 constexpr ImPlotRange(
double _min,
double _max) : Min(_min), Max(_max) { }
487 bool Contains(
double value)
const {
return value >= Min && value <= Max; }
488 double Size()
const {
return Max - Min; }
489 double Clamp(
double value)
const {
return (value < Min) ? Min : (value > Max) ? Max : value; }
495 constexpr ImPlotRect() : X(0.0,0.0), Y(0.0,0.0) { }
496 constexpr ImPlotRect(
double x_min,
double x_max,
double y_min,
double y_max) : X(x_min, x_max), Y(y_min, y_max) { }
497 bool Contains(
const ImPlotPoint& p)
const {
return Contains(p.x, p.y); }
498 bool Contains(
double x,
double y)
const {
return X.Contains(x) && Y.Contains(y); }
515 float ErrorBarWeight;
516 float DigitalBitHeight;
519 float PlotBorderSize;
530 ImVec2 LegendInnerPadding;
538 ImVec4 Colors[ImPlotCol_COUNT];
540 ImPlotColormap Colormap;
549#if (IMGUI_VERSION_NUM < 18716)
550#define ImGuiMod_None 0
551#define ImGuiMod_Ctrl ImGuiKeyModFlags_Ctrl
552#define ImGuiMod_Shift ImGuiKeyModFlags_Shift
553#define ImGuiMod_Alt ImGuiKeyModFlags_Alt
554#define ImGuiMod_Super ImGuiKeyModFlags_Super
555#elif (IMGUI_VERSION_NUM < 18823)
556#define ImGuiMod_None 0
557#define ImGuiMod_Ctrl ImGuiModFlags_Ctrl
558#define ImGuiMod_Shift ImGuiModFlags_Shift
559#define ImGuiMod_Alt ImGuiModFlags_Alt
560#define ImGuiMod_Super ImGuiModFlags_Super
565 ImGuiMouseButton Pan;
567 ImGuiMouseButton Fit;
568 ImGuiMouseButton Select;
569 ImGuiMouseButton SelectCancel;
573 ImGuiMouseButton Menu;
585typedef int (*ImPlotFormatter)(
double value,
char* buff,
int size,
void* user_data);
588typedef ImPlotPoint (*ImPlotGetter)(
int idx,
void* user_data);
591typedef double (*ImPlotTransform)(
double value,
void* user_data);
634IMPLOT_API
bool BeginPlot(
const char* title_id,
const ImVec2& size=
ImVec2(-1,0), ImPlotFlags flags=0);
638IMPLOT_API
void EndPlot();
690IMPLOT_API
bool BeginSubplots(
const char* title_id,
694 ImPlotSubplotFlags flags = 0,
695 float* row_ratios =
nullptr,
696 float* col_ratios =
nullptr);
700IMPLOT_API
void EndSubplots();
732IMPLOT_API
void SetupAxis(ImAxis axis,
const char* label=
nullptr, ImPlotAxisFlags flags=0);
734IMPLOT_API
void SetupAxisLimits(ImAxis axis,
double v_min,
double v_max, ImPlotCond cond = ImPlotCond_Once);
736IMPLOT_API
void SetupAxisLinks(ImAxis axis,
double* link_min,
double* link_max);
738IMPLOT_API
void SetupAxisFormat(ImAxis axis,
const char* fmt);
740IMPLOT_API
void SetupAxisFormat(ImAxis axis, ImPlotFormatter formatter,
void* data=
nullptr);
742IMPLOT_API
void SetupAxisTicks(ImAxis axis,
const double* values,
int n_ticks,
const char*
const labels[]=
nullptr,
bool keep_default=
false);
744IMPLOT_API
void SetupAxisTicks(ImAxis axis,
double v_min,
double v_max,
int n_ticks,
const char*
const labels[]=
nullptr,
bool keep_default=
false);
746IMPLOT_API
void SetupAxisScale(ImAxis axis, ImPlotScale scale);
748IMPLOT_API
void SetupAxisScale(ImAxis axis, ImPlotTransform forward, ImPlotTransform inverse,
void* data=
nullptr);
750IMPLOT_API
void SetupAxisLimitsConstraints(ImAxis axis,
double v_min,
double v_max);
752IMPLOT_API
void SetupAxisZoomConstraints(ImAxis axis,
double z_min,
double z_max);
755IMPLOT_API
void SetupAxes(
const char* x_label,
const char* y_label, ImPlotAxisFlags x_flags=0, ImPlotAxisFlags y_flags=0);
757IMPLOT_API
void SetupAxesLimits(
double x_min,
double x_max,
double y_min,
double y_max, ImPlotCond cond = ImPlotCond_Once);
760IMPLOT_API
void SetupLegend(ImPlotLocation location, ImPlotLegendFlags flags=0);
762IMPLOT_API
void SetupMouseText(ImPlotLocation location, ImPlotMouseTextFlags flags=0);
766IMPLOT_API
void SetupFinish();
792IMPLOT_API
void SetNextAxisLimits(ImAxis axis,
double v_min,
double v_max, ImPlotCond cond = ImPlotCond_Once);
794IMPLOT_API
void SetNextAxisLinks(ImAxis axis,
double* link_min,
double* link_max);
796IMPLOT_API
void SetNextAxisToFit(ImAxis axis);
799IMPLOT_API
void SetNextAxesLimits(
double x_min,
double x_max,
double y_min,
double y_max, ImPlotCond cond = ImPlotCond_Once);
801IMPLOT_API
void SetNextAxesToFit();
856IMPLOT_TMP
void PlotLine(
const char* label_id,
const T* values,
int count,
double xscale=1,
double xstart=0, ImPlotLineFlags flags=0,
int offset=0,
int stride=
sizeof(T));
857IMPLOT_TMP
void PlotLine(
const char* label_id,
const T* xs,
const T* ys,
int count, ImPlotLineFlags flags=0,
int offset=0,
int stride=
sizeof(T));
858IMPLOT_API
void PlotLineG(
const char* label_id, ImPlotGetter getter,
void* data,
int count, ImPlotLineFlags flags=0);
861IMPLOT_TMP
void PlotScatter(
const char* label_id,
const T* values,
int count,
double xscale=1,
double xstart=0, ImPlotScatterFlags flags=0,
int offset=0,
int stride=
sizeof(T));
862IMPLOT_TMP
void PlotScatter(
const char* label_id,
const T* xs,
const T* ys,
int count, ImPlotScatterFlags flags=0,
int offset=0,
int stride=
sizeof(T));
863IMPLOT_API
void PlotScatterG(
const char* label_id, ImPlotGetter getter,
void* data,
int count, ImPlotScatterFlags flags=0);
866IMPLOT_TMP
void PlotStairs(
const char* label_id,
const T* values,
int count,
double xscale=1,
double xstart=0, ImPlotStairsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
867IMPLOT_TMP
void PlotStairs(
const char* label_id,
const T* xs,
const T* ys,
int count, ImPlotStairsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
868IMPLOT_API
void PlotStairsG(
const char* label_id, ImPlotGetter getter,
void* data,
int count, ImPlotStairsFlags flags=0);
871IMPLOT_TMP
void PlotShaded(
const char* label_id,
const T* values,
int count,
double yref=0,
double xscale=1,
double xstart=0, ImPlotShadedFlags flags=0,
int offset=0,
int stride=
sizeof(T));
872IMPLOT_TMP
void PlotShaded(
const char* label_id,
const T* xs,
const T* ys,
int count,
double yref=0, ImPlotShadedFlags flags=0,
int offset=0,
int stride=
sizeof(T));
873IMPLOT_TMP
void PlotShaded(
const char* label_id,
const T* xs,
const T* ys1,
const T* ys2,
int count, ImPlotShadedFlags flags=0,
int offset=0,
int stride=
sizeof(T));
874IMPLOT_API
void PlotShadedG(
const char* label_id, ImPlotGetter getter1,
void* data1, ImPlotGetter getter2,
void* data2,
int count, ImPlotShadedFlags flags=0);
877IMPLOT_TMP
void PlotBars(
const char* label_id,
const T* values,
int count,
double bar_size=0.67,
double shift=0, ImPlotBarsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
878IMPLOT_TMP
void PlotBars(
const char* label_id,
const T* xs,
const T* ys,
int count,
double bar_size, ImPlotBarsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
879IMPLOT_API
void PlotBarsG(
const char* label_id, ImPlotGetter getter,
void* data,
int count,
double bar_size, ImPlotBarsFlags flags=0);
882IMPLOT_TMP
void PlotBarGroups(
const char*
const label_ids[],
const T* values,
int item_count,
int group_count,
double group_size=0.67,
double shift=0, ImPlotBarGroupsFlags flags=0);
885IMPLOT_TMP
void PlotErrorBars(
const char* label_id,
const T* xs,
const T* ys,
const T* err,
int count, ImPlotErrorBarsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
886IMPLOT_TMP
void PlotErrorBars(
const char* label_id,
const T* xs,
const T* ys,
const T* neg,
const T* pos,
int count, ImPlotErrorBarsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
889IMPLOT_TMP
void PlotStems(
const char* label_id,
const T* values,
int count,
double ref=0,
double scale=1,
double start=0, ImPlotStemsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
890IMPLOT_TMP
void PlotStems(
const char* label_id,
const T* xs,
const T* ys,
int count,
double ref=0, ImPlotStemsFlags flags=0,
int offset=0,
int stride=
sizeof(T));
893IMPLOT_TMP
void PlotInfLines(
const char* label_id,
const T* values,
int count, ImPlotInfLinesFlags flags=0,
int offset=0,
int stride=
sizeof(T));
896IMPLOT_TMP
void PlotPieChart(
const char*
const label_ids[],
const T* values,
int count,
double x,
double y,
double radius, ImPlotFormatter fmt,
void* fmt_data=
nullptr,
double angle0=90, ImPlotPieChartFlags flags=0);
897IMPLOT_TMP
void PlotPieChart(
const char*
const label_ids[],
const T* values,
int count,
double x,
double y,
double radius,
const char* label_fmt=
"%.1f",
double angle0=90, ImPlotPieChartFlags flags=0);
900IMPLOT_TMP
void PlotHeatmap(
const char* label_id,
const T* values,
int rows,
int cols,
double scale_min=0,
double scale_max=0,
const char* label_fmt=
"%.1f",
const ImPlotPoint& bounds_min=
ImPlotPoint(0,0),
const ImPlotPoint& bounds_max=
ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0);
904IMPLOT_TMP
double PlotHistogram(
const char* label_id,
const T* values,
int count,
int bins=ImPlotBin_Sturges,
double bar_scale=1.0,
ImPlotRange range=
ImPlotRange(), ImPlotHistogramFlags flags=0);
908IMPLOT_TMP
double PlotHistogram2D(
const char* label_id,
const T* xs,
const T* ys,
int count,
int x_bins=ImPlotBin_Sturges,
int y_bins=ImPlotBin_Sturges,
ImPlotRect range=
ImPlotRect(), ImPlotHistogramFlags flags=0);
911IMPLOT_TMP
void PlotDigital(
const char* label_id,
const T* xs,
const T* ys,
int count, ImPlotDigitalFlags flags=0,
int offset=0,
int stride=
sizeof(T));
912IMPLOT_API
void PlotDigitalG(
const char* label_id, ImPlotGetter getter,
void* data,
int count, ImPlotDigitalFlags flags=0);
915IMPLOT_API
void PlotImage(
const char* label_id, ImTextureID user_texture_id,
const ImPlotPoint& bounds_min,
const ImPlotPoint& bounds_max,
const ImVec2& uv0=
ImVec2(0,0),
const ImVec2& uv1=
ImVec2(1,1),
const ImVec4& tint_col=
ImVec4(1,1,1,1), ImPlotImageFlags flags=0);
918IMPLOT_API
void PlotText(
const char* text,
double x,
double y,
const ImVec2& pix_offset=
ImVec2(0,0), ImPlotTextFlags flags=0);
921IMPLOT_API
void PlotDummy(
const char* label_id, ImPlotDummyFlags flags=0);
934IMPLOT_API
bool DragPoint(
int id,
double* x,
double* y,
const ImVec4& col,
float size = 4, ImPlotDragToolFlags flags = 0,
bool* out_clicked =
nullptr,
bool* out_hovered =
nullptr,
bool* held =
nullptr);
936IMPLOT_API
bool DragLineX(
int id,
double* x,
const ImVec4& col,
float thickness = 1, ImPlotDragToolFlags flags = 0,
bool* out_clicked =
nullptr,
bool* out_hovered =
nullptr,
bool* held =
nullptr);
938IMPLOT_API
bool DragLineY(
int id,
double* y,
const ImVec4& col,
float thickness = 1, ImPlotDragToolFlags flags = 0,
bool* out_clicked =
nullptr,
bool* out_hovered =
nullptr,
bool* held =
nullptr);
940IMPLOT_API
bool DragRect(
int id,
double* x1,
double* y1,
double* x2,
double* y2,
const ImVec4& col, ImPlotDragToolFlags flags = 0,
bool* out_clicked =
nullptr,
bool* out_hovered =
nullptr,
bool* held =
nullptr);
943IMPLOT_API
void Annotation(
double x,
double y,
const ImVec4& col,
const ImVec2& pix_offset,
bool clamp,
bool round =
false);
944IMPLOT_API
void Annotation(
double x,
double y,
const ImVec4& col,
const ImVec2& pix_offset,
bool clamp,
const char* fmt, ...) IM_FMTARGS(6);
945IMPLOT_API
void AnnotationV(
double x,
double y, const
ImVec4& col, const
ImVec2& pix_offset,
bool clamp, const
char* fmt, va_list args) IM_FMTLIST(6);
948IMPLOT_API
void TagX(
double x, const
ImVec4& col,
bool round = false);
949IMPLOT_API
void TagX(
double x, const
ImVec4& col, const
char* fmt, ...) IM_FMTARGS(3);
950IMPLOT_API
void TagXV(
double x, const
ImVec4& col, const
char* fmt, va_list args) IM_FMTLIST(3);
953IMPLOT_API
void TagY(
double y, const
ImVec4& col,
bool round = false);
954IMPLOT_API
void TagY(
double y, const
ImVec4& col, const
char* fmt, ...) IM_FMTARGS(3);
955IMPLOT_API
void TagYV(
double y, const
ImVec4& col, const
char* fmt, va_list args) IM_FMTLIST(3);
962IMPLOT_API
void SetAxis(ImAxis axis);
963IMPLOT_API
void SetAxes(ImAxis x_axis, ImAxis y_axis);
966IMPLOT_API
ImPlotPoint PixelsToPlot(const
ImVec2& pix, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
967IMPLOT_API
ImPlotPoint PixelsToPlot(
float x,
float y, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
970IMPLOT_API
ImVec2 PlotToPixels(const
ImPlotPoint& plt, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
971IMPLOT_API
ImVec2 PlotToPixels(
double x,
double y, ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
974IMPLOT_API
ImVec2 GetPlotPos();
976IMPLOT_API
ImVec2 GetPlotSize();
979IMPLOT_API
ImPlotPoint GetPlotMousePos(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
981IMPLOT_API
ImPlotRect GetPlotLimits(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
984IMPLOT_API
bool IsPlotHovered();
986IMPLOT_API
bool IsAxisHovered(ImAxis axis);
988IMPLOT_API
bool IsSubplotsHovered();
991IMPLOT_API
bool IsPlotSelected();
993IMPLOT_API
ImPlotRect GetPlotSelection(ImAxis x_axis = IMPLOT_AUTO, ImAxis y_axis = IMPLOT_AUTO);
995IMPLOT_API
void CancelPlotSelection();
999IMPLOT_API
void HideNextItem(
bool hidden = true, ImPlotCond cond = ImPlotCond_Once);
1008IMPLOT_API
bool BeginAlignedPlots(const
char* group_id,
bool vertical = true);
1010IMPLOT_API
void EndAlignedPlots();
1017IMPLOT_API
bool BeginLegendPopup(const
char* label_id, ImGuiMouseButton mouse_button=1);
1019IMPLOT_API
void EndLegendPopup();
1021IMPLOT_API
bool IsLegendEntryHovered(const
char* label_id);
1028IMPLOT_API
bool BeginDragDropTargetPlot();
1030IMPLOT_API
bool BeginDragDropTargetAxis(ImAxis axis);
1032IMPLOT_API
bool BeginDragDropTargetLegend();
1034IMPLOT_API
void EndDragDropTarget();
1040IMPLOT_API
bool BeginDragDropSourcePlot(ImGuiDragDropFlags flags=0);
1042IMPLOT_API
bool BeginDragDropSourceAxis(ImAxis axis, ImGuiDragDropFlags flags=0);
1044IMPLOT_API
bool BeginDragDropSourceItem(const
char* label_id, ImGuiDragDropFlags flags=0);
1046IMPLOT_API
void EndDragDropSource();
1085IMPLOT_API
void StyleColorsAuto(
ImPlotStyle* dst =
nullptr);
1087IMPLOT_API
void StyleColorsClassic(
ImPlotStyle* dst =
nullptr);
1089IMPLOT_API
void StyleColorsDark(
ImPlotStyle* dst =
nullptr);
1091IMPLOT_API
void StyleColorsLight(
ImPlotStyle* dst =
nullptr);
1098IMPLOT_API
void PushStyleColor(ImPlotCol idx, ImU32 col);
1099IMPLOT_API
void PushStyleColor(ImPlotCol idx, const
ImVec4& col);
1101IMPLOT_API
void PopStyleColor(
int count = 1);
1104IMPLOT_API
void PushStyleVar(ImPlotStyleVar idx,
float val);
1106IMPLOT_API
void PushStyleVar(ImPlotStyleVar idx,
int val);
1108IMPLOT_API
void PushStyleVar(ImPlotStyleVar idx, const
ImVec2& val);
1110IMPLOT_API
void PopStyleVar(
int count = 1);
1118IMPLOT_API
void SetNextLineStyle(const
ImVec4& col = IMPLOT_AUTO_COL,
float weight = IMPLOT_AUTO);
1120IMPLOT_API
void SetNextFillStyle(const
ImVec4& col = IMPLOT_AUTO_COL,
float alpha_mod = IMPLOT_AUTO);
1122IMPLOT_API
void SetNextMarkerStyle(ImPlotMarker marker = IMPLOT_AUTO,
float size = IMPLOT_AUTO, const
ImVec4& fill = IMPLOT_AUTO_COL,
float weight = IMPLOT_AUTO, const
ImVec4& outline = IMPLOT_AUTO_COL);
1124IMPLOT_API
void SetNextErrorBarStyle(const
ImVec4& col = IMPLOT_AUTO_COL,
float size = IMPLOT_AUTO,
float weight = IMPLOT_AUTO);
1127IMPLOT_API
ImVec4 GetLastItemColor();
1130IMPLOT_API const
char* GetStyleColorName(ImPlotCol idx);
1132IMPLOT_API const
char* GetMarkerName(ImPlotMarker idx);
1153IMPLOT_API ImPlotColormap AddColormap(const
char* name, const
ImVec4* cols,
int size,
bool qual=true);
1154IMPLOT_API ImPlotColormap AddColormap(const
char* name, const ImU32* cols,
int size,
bool qual=true);
1157IMPLOT_API
int GetColormapCount();
1159IMPLOT_API const
char* GetColormapName(ImPlotColormap cmap);
1161IMPLOT_API ImPlotColormap GetColormapIndex(const
char* name);
1164IMPLOT_API
void PushColormap(ImPlotColormap cmap);
1166IMPLOT_API
void PushColormap(const
char* name);
1168IMPLOT_API
void PopColormap(
int count = 1);
1172IMPLOT_API
ImVec4 NextColormapColor();
1178IMPLOT_API
int GetColormapSize(ImPlotColormap cmap = IMPLOT_AUTO);
1180IMPLOT_API
ImVec4 GetColormapColor(
int idx, ImPlotColormap cmap = IMPLOT_AUTO);
1182IMPLOT_API
ImVec4 SampleColormap(
float t, ImPlotColormap cmap = IMPLOT_AUTO);
1185IMPLOT_API
void ColormapScale(const
char* label,
double scale_min,
double scale_max, const
ImVec2& size =
ImVec2(0,0), const
char* format = "%g", ImPlotColormapScaleFlags flags = 0, ImPlotColormap cmap = IMPLOT_AUTO);
1187IMPLOT_API
bool ColormapSlider(const
char* label,
float* t,
ImVec4* out =
nullptr, const
char* format = "", ImPlotColormap cmap = IMPLOT_AUTO);
1189IMPLOT_API
bool ColormapButton(const
char* label, const
ImVec2& size =
ImVec2(0,0), ImPlotColormap cmap = IMPLOT_AUTO);
1198IMPLOT_API
void BustColorCache(const
char* plot_title_id =
nullptr);
1217IMPLOT_API
void ItemIcon(const
ImVec4& col);
1218IMPLOT_API
void ItemIcon(ImU32 col);
1219IMPLOT_API
void ColormapIcon(ImPlotColormap cmap);
1224IMPLOT_API
void PushPlotClipRect(
float expand=0);
1226IMPLOT_API
void PopPlotClipRect();
1229IMPLOT_API
bool ShowStyleSelector(const
char* label);
1231IMPLOT_API
bool ShowColormapSelector(const
char* label);
1233IMPLOT_API
bool ShowInputMapSelector(const
char* label);
1235IMPLOT_API
void ShowStyleEditor(
ImPlotStyle* ref =
nullptr);
1237IMPLOT_API
void ShowUserGuide();
1239IMPLOT_API
void ShowMetricsWindow(
bool* p_popen =
nullptr);
1246IMPLOT_API
void ShowDemoWindow(
bool* p_open =
nullptr);
1259#ifndef IMPLOT_DISABLE_OBSOLETE_FUNCTIONS
1261#ifndef IMPLOT_DISABLE_DEPRECATED_WARNINGS
1262#if __cplusplus > 201402L
1263#define IMPLOT_DEPRECATED(method) [[deprecated]] method
1264#elif defined( __GNUC__ ) && !defined( __INTEL_COMPILER ) && ( __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 ) )
1265#define IMPLOT_DEPRECATED(method) method __attribute__( ( deprecated ) )
1266#elif defined( _MSC_VER )
1267#define IMPLOT_DEPRECATED(method) __declspec(deprecated) method
1269#define IMPLOT_DEPRECATED(method) method
1272#define IMPLOT_DEPRECATED(method) method
1275enum ImPlotFlagsObsolete_ {
1276 ImPlotFlags_YAxis2 = 1 << 20,
1277 ImPlotFlags_YAxis3 = 1 << 21,
1283IMPLOT_DEPRECATED( IMPLOT_API
bool BeginPlot(
const char* title_id,
1284 const char* x_label,
1285 const char* y_label,
1287 ImPlotFlags flags = ImPlotFlags_None,
1288 ImPlotAxisFlags x_flags = 0,
1289 ImPlotAxisFlags y_flags = 0,
1290 ImPlotAxisFlags y2_flags = ImPlotAxisFlags_AuxDefault,
1291 ImPlotAxisFlags y3_flags = ImPlotAxisFlags_AuxDefault,
1292 const char* y2_label =
nullptr,
1293 const char* y3_label =
nullptr) );
Definition imgui_internal.h:2012
Definition implot_internal.h:1204