ImPlot’s internal API (implot_internal.h): the structures and helpers that ImPlot is built with.
The C++ API of ImPlot as it is bound to Python: the entries of the module imgui_bundle.implot.internal, in the same order, with their C++ signatures and the headers’ comments. From the stubs: the functions excluded from the bindings, the typedefs and the macros are absent.
implot_internal.h¶
Generic Helpers¶
Computes the common (base-10) logarithm¶
ImPlot::ImLog10¶
static inline float ImLog10(float x);(private API)
ImPlot::ImSinh¶
static inline float ImSinh(float x);(private API)
ImPlot::ImAsinh¶
static inline float ImAsinh(float x);(private API)
ImPlot::ImPosMod¶
static inline int ImPosMod(int l, int r);Returns always positive modulo (assumes r != 0) (private API)
ImPlot::ImNan¶
static inline bool ImNan(double val);Returns True if val is NAN (private API)
ImPlot::ImNanOrInf¶
static inline bool ImNanOrInf(double val);Returns True if val is NAN or INFINITY (private API)
ImPlot::ImConstrainNan¶
static inline double ImConstrainNan(double val);Turns NANs to 0s (private API)
ImPlot::ImConstrainInf¶
static inline double ImConstrainInf(double val);Turns infinity to floating point maximums (private API)
ImPlot::ImConstrainLog¶
static inline double ImConstrainLog(double val);Turns numbers less than or equal to 0 to 0.001 (sort of arbitrary, is there a better way?) (private API)
ImPlot::ImConstrainTime¶
static inline double ImConstrainTime(double val);Turns numbers less than 0 to zero (private API)
ImPlot::ImAlmostEqual¶
static inline bool ImAlmostEqual(double v1, double v2, int ulp = 2);True if two numbers are approximately equal using units in the last place. (private API)
ImPlot::ImMixU32¶
static inline ImU32 ImMixU32(ImU32 a, ImU32 b, ImU32 s);Mix color a and b by factor s in [0 256] (private API)
ImPlot::ImLerpU32¶
static inline ImU32 ImLerpU32(const ImU32* colors, int size, float t);Lerp across an array of 32-bit colors given t in [0.0 1.0] (private API)
ImPlot::ImAlphaU32¶
static inline ImU32 ImAlphaU32(ImU32 col, float alpha);Set alpha channel of 32-bit color from float in range [0.0 1.0] (private API)
TimeUnit_ (enum)¶
| Member | Value | |
|---|---|---|
ImPlotTimeUnit_Us | 0 | microsecond |
ImPlotTimeUnit_Ms | 1 | millisecond |
ImPlotTimeUnit_S | 2 | second |
ImPlotTimeUnit_Min | 3 | minute |
ImPlotTimeUnit_Hr | 4 | hour |
ImPlotTimeUnit_Day | 5 | day |
ImPlotTimeUnit_Mo | 6 | month |
ImPlotTimeUnit_Yr | 7 | year |
ImPlotTimeUnit_COUNT | 8 |
DateFmt_ (enum)¶
| Member | Value | |
|---|---|---|
ImPlotDateFmt_None = 0 | 0 | |
ImPlotDateFmt_DayMo | 1 | 10/3 [ --10-03 ] |
ImPlotDateFmt_DayMoYr | 2 | 10/3/91 [ 1991-10-03 ] |
ImPlotDateFmt_MoYr | 3 | Oct 1991 [ 1991-10 ] |
ImPlotDateFmt_Mo | 4 | Oct [ --10 ] |
ImPlotDateFmt_Yr | 5 | 1991 [ 1991 ] |
TimeFmt_ (enum)¶
| Member | Value | |
|---|---|---|
ImPlotTimeFmt_None = 0 | 0 | |
ImPlotTimeFmt_Us | 1 | .428 552 [ .428 552 ] |
ImPlotTimeFmt_SUs | 2 | :29.428 552 [ :29.428 552 ] |
ImPlotTimeFmt_SMs | 3 | :29.428 [ :29.428 ] |
ImPlotTimeFmt_S | 4 | :29 [ :29 ] |
ImPlotTimeFmt_MinSMs | 5 | 21:29.428 [ 21:29.428 ] |
ImPlotTimeFmt_HrMinSMs | 6 | 7:21:29.428pm [ 19:21:29.428 ] |
ImPlotTimeFmt_HrMinS | 7 | 7:21:29pm [ 19:21:29 ] |
ImPlotTimeFmt_HrMin | 8 | 7:21pm [ 19:21 ] |
ImPlotTimeFmt_Hr | 9 | 7pm [ 19:00 ] |
MarkerInternal_ (enum)¶
| Member | Value | |
|---|---|---|
ImPlotMarker_Invalid = -3 | -3 |
Structs¶
DateTimeSpec (struct)¶
Combined date/time format spec
| Member | |
|---|---|
ImPlotDateFmt Date; | |
ImPlotTimeFmt Time; | |
bool UseISO8601; | |
bool Use24HourClock; |
DateTimeSpec::ImPlotDateTimeSpec¶
ImPlotDateTimeSpec();ImPlotDateTimeSpec(ImPlotDateFmt date_fmt, ImPlotTimeFmt time_fmt, bool use_24_hr_clk = false, bool use_iso_8601 = false);Time (struct)¶
Two part timestamp struct.
| Member | |
|---|---|
time_t S; | second part |
int Us; | microsecond part |
Time::ImPlotTime¶
ImPlotTime();ImPlotTime(time_t s, int us = 0);Time::RollOver¶
void RollOver();(private API)
Time::ToDouble¶
double ToDouble() const;(private API)
Time::FromDouble¶
static ImPlotTime FromDouble(double t);(private API)
ColormapData (struct)¶
Colormap data storage
| Member | |
|---|---|
ImVector<ImU32> Keys; | |
ImVector<int> KeyCounts; | |
ImVector<int> KeyOffsets; | |
ImVector<ImU32> Tables; | |
ImVector<int> TableSizes; | |
ImVector<int> TableOffsets; | |
ImGuiTextBuffer Text; | |
ImVector<int> TextOffsets; | |
ImGuiStorage Map; | |
int Count; |
ColormapData::ImPlotColormapData¶
ImPlotColormapData();ColormapData::Append¶
int Append(const char* name, const ImU32* keys, int count, bool qual);(private API)
ColormapData::RebuildTables¶
void RebuildTables();(private API)
ColormapData::IsQual¶
inline bool IsQual(ImPlotColormap cmap) const;(private API)
ColormapData::GetName¶
inline const char* GetName(ImPlotColormap cmap) const;(private API)
ColormapData::GetIndex¶
inline ImPlotColormap GetIndex(const char* name) const;(private API)
ColormapData::GetKeys¶
inline const ImU32* GetKeys(ImPlotColormap cmap) const;(private API)
ColormapData::GetKeyCount¶
inline int GetKeyCount(ImPlotColormap cmap) const;(private API)
ColormapData::GetKeyColor¶
inline ImU32 GetKeyColor(ImPlotColormap cmap, int idx) const;(private API)
ColormapData::SetKeyColor¶
inline void SetKeyColor(ImPlotColormap cmap, int idx, ImU32 value);(private API)
ColormapData::GetTable¶
inline const ImU32* GetTable(ImPlotColormap cmap) const;(private API)
ColormapData::GetTableSize¶
inline int GetTableSize(ImPlotColormap cmap) const;(private API)
ColormapData::GetTableColor¶
inline ImU32 GetTableColor(ImPlotColormap cmap, int idx) const;(private API)
ColormapData::LerpTable¶
inline ImU32 LerpTable(ImPlotColormap cmap, float t) const;(private API)
PointError (struct)¶
ImPlotPoint with positive/negative error values
| Member | |
|---|---|
double X, | |
Y, | |
Neg, | |
Pos; |
PointError::ImPlotPointError¶
ImPlotPointError();ImPlotPointError(double x, double y, double neg, double pos);Annotation (struct)¶
Interior plot label/annotation
| Member | |
|---|---|
ImVec2 Pos; | |
ImVec2 Offset; | |
ImU32 ColorBg; | |
ImU32 ColorFg; | |
int TextOffset; | |
bool Clamp; |
Annotation::ImPlotAnnotation¶
ImPlotAnnotation();AnnotationCollection (struct)¶
Collection of plot labels
| Member | |
|---|---|
ImGuiTextBuffer TextBuffer; | |
int Size; |
AnnotationCollection::ImPlotAnnotationCollection¶
ImPlotAnnotationCollection();AnnotationCollection::Append¶
void Append(const ImVec2& pos, const ImVec2& off, ImU32 bg, ImU32 fg, bool clamp, const char* fmt, ...);(private API)
AnnotationCollection::GetText¶
const char* GetText(int idx);(private API)
AnnotationCollection::Reset¶
void Reset();(private API)
Tag (struct)¶
| Member | |
|---|---|
ImAxis Axis; | |
double Value; | |
ImU32 ColorBg; | |
ImU32 ColorFg; | |
int TextOffset; |
Tag::ImPlotTag¶
ImPlotTag();TagCollection (struct)¶
| Member | |
|---|---|
ImGuiTextBuffer TextBuffer; | |
int Size; |
TagCollection::ImPlotTagCollection¶
ImPlotTagCollection();TagCollection::Append¶
void Append(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, ...);(private API)
TagCollection::GetText¶
const char* GetText(int idx);(private API)
TagCollection::Reset¶
void Reset();(private API)
Tick (struct)¶
Tick mark info
| Member | |
|---|---|
double PlotPos; | |
float PixelPos; | |
ImVec2 LabelSize; | |
int TextOffset; | |
bool Major; | |
bool ShowLabel; | |
int Level; | |
int Idx; |
Tick::ImPlotTick¶
ImPlotTick();ImPlotTick(double value, bool major, int level, bool show_label);Ticker (struct)¶
Collection of ticks
| Member | |
|---|---|
ImGuiTextBuffer TextBuffer; | |
ImVec2 MaxSize; | |
ImVec2 LateSize; | |
int Levels; |
Ticker::ImPlotTicker¶
ImPlotTicker();Ticker::AddTick¶
ImPlotTick& AddTick(double value, bool major, int level, bool show_label, const char* label);inline ImPlotTick& AddTick(ImPlotTick tick);(private API)
Ticker::GetText¶
const char* GetText(int idx) const;const char* GetText(const ImPlotTick& tick);(private API)
Ticker::OverrideSizeLate¶
void OverrideSizeLate(const ImVec2& size);(private API)
Ticker::Reset¶
void Reset();(private API)
Ticker::TickCount¶
int TickCount() const;(private API)
Axis (struct)¶
Axis state information that must persist after EndPlot
| Member | |
|---|---|
ImGuiID ID; | |
ImPlotAxisFlags Flags; | |
ImPlotAxisFlags PreviousFlags; | |
ImPlotRange Range; | |
ImPlotCond RangeCond; | |
ImPlotScale Scale; | |
ImPlotRange FitExtents; | |
ImPlotAxis* OrthoAxis; | |
ImPlotRange ConstraintRange; | |
ImPlotRange ConstraintZoom; | |
ImPlotTicker Ticker; | |
void* FormatterData; | |
double* LinkedMin; | |
double* LinkedMax; | |
int PickerLevel; | |
ImPlotTime PickerTimeMin, | |
PickerTimeMax; | |
void* TransformData; | |
float PixelMin, | |
PixelMax; | |
double ScaleMin, | |
ScaleMax; | |
double ScaleToPixel; | |
float Datum1, | |
Datum2; | |
ImRect HoverRect; | |
int LabelOffset; | |
ImU32 ColorMaj, | |
ColorMin, | |
ColorTick, | |
ColorTxt, | |
ColorBg, | |
ColorHov, | |
ColorAct, | |
ColorHiLi; | |
bool Enabled; | |
bool Vertical; | |
bool FitThisFrame; | |
bool HasRange; | |
bool HasFormatSpec; | |
bool ShowDefaultTicks; | |
bool Hovered; | |
bool Held; |
Axis::ImPlotAxis¶
ImPlotAxis();Axis::Reset¶
inline void Reset();(private API)
Axis::SetMin¶
inline bool SetMin(double _min, bool force=false);(private API)
Axis::SetMax¶
inline bool SetMax(double _max, bool force=false);(private API)
Axis::SetRange¶
inline void SetRange(double v1, double v2);inline void SetRange(const ImPlotRange& range);(private API)
Axis::SetAspect¶
inline void SetAspect(double unit_per_pix);(private API)
Axis::PixelSize¶
inline float PixelSize() const;(private API)
Axis::GetAspect¶
inline double GetAspect() const;(private API)
Axis::Constrain¶
inline void Constrain();(private API)
Axis::UpdateTransformCache¶
inline void UpdateTransformCache();(private API)
Axis::PlotToPixels¶
inline float PlotToPixels(double plt) const;(private API)
Axis::PixelsToPlot¶
inline double PixelsToPlot(float pix) const;(private API)
Axis::ExtendFit¶
inline void ExtendFit(double v);(private API)
Axis::ExtendFitWith¶
inline void ExtendFitWith(ImPlotAxis& alt, double v, double v_alt);(private API)
Axis::ApplyFit¶
inline void ApplyFit(float padding);(private API)
Axis::HasLabel¶
inline bool HasLabel() const;(private API)
Axis::HasGridLines¶
inline bool HasGridLines() const;(private API)
Axis::HasTickLabels¶
inline bool HasTickLabels() const;(private API)
Axis::HasTickMarks¶
inline bool HasTickMarks() const;(private API)
Axis::WillRender¶
inline bool WillRender() const;(private API)
Axis::IsOpposite¶
inline bool IsOpposite() const;(private API)
Axis::IsInverted¶
inline bool IsInverted() const;(private API)
Axis::IsForeground¶
inline bool IsForeground() const;(private API)
Axis::IsAutoFitting¶
inline bool IsAutoFitting() const;(private API)
Axis::CanInitFit¶
inline bool CanInitFit() const;(private API)
Axis::IsRangeLocked¶
inline bool IsRangeLocked() const;(private API)
Axis::IsLockedMin¶
inline bool IsLockedMin() const;(private API)
Axis::IsLockedMax¶
inline bool IsLockedMax() const;(private API)
Axis::IsLocked¶
inline bool IsLocked() const;(private API)
Axis::IsInputLockedMin¶
inline bool IsInputLockedMin() const;(private API)
Axis::IsInputLockedMax¶
inline bool IsInputLockedMax() const;(private API)
Axis::IsInputLocked¶
inline bool IsInputLocked() const;(private API)
Axis::HasMenus¶
inline bool HasMenus() const;(private API)
Axis::IsPanLocked¶
inline bool IsPanLocked(bool increasing);(private API)
Axis::PushLinks¶
void PushLinks();(private API)
Axis::PullLinks¶
void PullLinks();(private API)
AlignmentData (struct)¶
Align plots group data
| Member | |
|---|---|
bool Vertical; | |
float PadA; | |
float PadB; | |
float PadAMax; | |
float PadBMax; |
AlignmentData::ImPlotAlignmentData¶
ImPlotAlignmentData();AlignmentData::Begin¶
void Begin();(private API)
AlignmentData::Update¶
void Update(float& pad_a, float& pad_b, float& delta_a, float& delta_b);(private API)
AlignmentData::End¶
void End();(private API)
AlignmentData::Reset¶
void Reset();(private API)
Item (struct)¶
State information for Plot items
| Member | |
|---|---|
ImGuiID ID; | |
ImU32 Color; | |
ImPlotMarker Marker; | |
ImRect LegendHoverRect; | |
int NameOffset; | |
bool Show; | |
bool LegendHovered; | |
bool SeenThisFrame; |
Item::ImPlotItem¶
ImPlotItem();Legend (struct)¶
Holds Legend state
| Member | |
|---|---|
ImPlotLegendFlags Flags; | |
ImPlotLegendFlags PreviousFlags; | |
ImPlotLocation Location; | |
ImPlotLocation PreviousLocation; | |
ImVec2 Scroll; | |
ImVector<int> Indices; | |
ImGuiTextBuffer Labels; | |
ImRect Rect; | |
ImRect RectClamped; | |
bool Hovered; | |
bool Held; | |
bool CanGoInside; |
Legend::ImPlotLegend¶
ImPlotLegend();Legend::Reset¶
void Reset();(private API)
ItemGroup (struct)¶
Holds Items and Legend data
| Member | |
|---|---|
ImGuiID ID; | |
ImPlotLegend Legend; | |
int ColormapIdx; | |
ImPlotMarker MarkerIdx; |
ItemGroup::ImPlotItemGroup¶
ImPlotItemGroup();ItemGroup::GetItemCount¶
int GetItemCount() const;(private API)
ItemGroup::GetItemID¶
ImGuiID GetItemID(const char* label_id);(private API)
ItemGroup::GetItem¶
ImPlotItem* GetItem(ImGuiID id);ImPlotItem* GetItem(const char* label_id);(private API)
ItemGroup::GetOrAddItem¶
ImPlotItem* GetOrAddItem(ImGuiID id);(private API)
ItemGroup::GetItemByIndex¶
ImPlotItem* GetItemByIndex(int i);(private API)
ItemGroup::GetItemIndex¶
int GetItemIndex(ImPlotItem* item);(private API)
ItemGroup::GetLegendCount¶
int GetLegendCount() const;(private API)
ItemGroup::GetLegendItem¶
ImPlotItem* GetLegendItem(int i);(private API)
ItemGroup::GetLegendLabel¶
const char* GetLegendLabel(int i);(private API)
ItemGroup::Reset¶
void Reset();(private API)
Plot (struct)¶
Holds Plot state information that must persist after EndPlot
| Member | |
|---|---|
ImGuiID ID; | |
ImPlotFlags Flags; | |
ImPlotFlags PreviousFlags; | |
ImPlotLocation MouseTextLocation; | |
ImPlotMouseTextFlags MouseTextFlags; | |
ImGuiTextBuffer TextBuffer; | |
ImPlotItemGroup Items; | |
ImAxis CurrentX; | |
ImAxis CurrentY; | |
ImRect FrameRect; | |
ImRect CanvasRect; | |
ImRect PlotRect; | |
ImRect AxesRect; | |
ImRect SelectRect; | |
ImVec2 SelectStart; | |
int TitleOffset; | |
bool JustCreated; | |
bool Initialized; | |
bool SetupLocked; | |
bool FitThisFrame; | |
bool Hovered; | |
bool Held; | |
bool Selecting; | |
bool Selected; | |
bool ContextLocked; |
Plot::ImPlotPlot¶
ImPlotPlot();Plot::IsInputLocked¶
inline bool IsInputLocked() const;(private API)
Plot::ClearTextBuffer¶
inline void ClearTextBuffer();(private API)
Plot::SetTitle¶
inline void SetTitle(const char* title);(private API)
Plot::HasTitle¶
inline bool HasTitle() const;(private API)
Plot::GetTitle¶
inline const char* GetTitle() const;(private API)
Plot::XAxis¶
inline ImPlotAxis& XAxis(int i);(private API)
Plot::YAxis¶
inline ImPlotAxis& YAxis(int i);(private API)
Plot::EnabledAxesX¶
inline int EnabledAxesX();(private API)
Plot::EnabledAxesY¶
inline int EnabledAxesY();(private API)
Plot::SetAxisLabel¶
inline void SetAxisLabel(ImPlotAxis& axis, const char* label);(private API)
Plot::GetAxisLabel¶
inline const char* GetAxisLabel(const ImPlotAxis& axis) const;(private API)
Subplot (struct)¶
Holds subplot data that must persist after EndSubplot
| Member | |
|---|---|
ImGuiID ID; | |
ImPlotSubplotFlags Flags; | |
ImPlotSubplotFlags PreviousFlags; | |
ImPlotItemGroup Items; | |
int Rows; | |
int Cols; | |
int CurrentIdx; | |
ImRect FrameRect; | |
ImRect GridRect; | |
ImVec2 CellSize; | |
ImVector<float> RowRatios; | |
ImVector<float> ColRatios; | |
float TempSizes[2]; | ndarray[type=float, size=2] |
bool FrameHovered; | |
bool HasTitle; |
Subplot::ImPlotSubplot¶
ImPlotSubplot();NextPlotData (struct)¶
Temporary data storage for upcoming plot
NextPlotData::ImPlotNextPlotData¶
ImPlotNextPlotData();NextPlotData::Reset¶
void Reset();(private API)
NextItemData (struct)¶
Temporary data storage for upcoming item
| Member | |
|---|---|
ImPlotSpec Spec; | |
bool RenderLine; | |
bool RenderFill; | |
bool RenderMarkerLine; | |
bool RenderMarkerFill; | |
bool RenderMarkers; | |
bool HasHidden; | |
bool Hidden; | |
ImPlotCond HiddenCond; |
NextItemData::ImPlotNextItemData¶
ImPlotNextItemData();NextItemData::Reset¶
void Reset();(private API)
Context (struct)¶
Holds state information that must persist between calls to BeginPlot()/EndPlot()
| Member | |
|---|---|
ImPlotPlot* CurrentPlot; | |
ImPlotSubplot* CurrentSubplot; | |
ImPlotItemGroup* CurrentItems; | |
ImPlotItem* CurrentItem; | |
ImPlotItem* PreviousItem; | |
ImPlotTicker CTicker; | |
ImPlotAnnotationCollection Annotations; | |
ImPlotTagCollection Tags; | |
ImPlotStyle Style; | |
ImVector<ImGuiColorMod> ColorModifiers; | |
ImVector<ImGuiStyleMod> StyleModifiers; | |
ImPlotColormapData ColormapData; | |
ImVector<int> TempInt1; | |
int DigitalPlotItemCnt; | |
int DigitalPlotOffset; | |
ImPlotNextPlotData NextPlotData; | |
ImPlotNextItemData NextItemData; | |
ImPlotInputMap InputMap; | |
bool OpenContextThisFrame; | |
ImGuiTextBuffer MousePosStringBuilder; | |
ImPlotItemGroup* SortItems; | |
ImPlotAlignmentData* CurrentAlignmentH; | |
ImPlotAlignmentData* CurrentAlignmentV; | |
bool CanDragPlotInNodeEditor = false; |
Context Utils¶
ImPlot::Initialize¶
IMPLOT_API void Initialize(ImPlotContext* ctx);Initializes an ImPlotContext
ImPlot::ResetCtxForNextPlot¶
IMPLOT_API void ResetCtxForNextPlot(ImPlotContext* ctx);Resets an ImPlot context for the next call to BeginPlot
ImPlot::ResetCtxForNextAlignedPlots¶
IMPLOT_API void ResetCtxForNextAlignedPlots(ImPlotContext* ctx);Resets an ImPlot context for the next call to BeginAlignedPlots
ImPlot::ResetCtxForNextSubplot¶
IMPLOT_API void ResetCtxForNextSubplot(ImPlotContext* ctx);Resets an ImPlot context for the next call to BeginSubplot
Plot Utils¶
ImPlot::GetPlot¶
IMPLOT_API ImPlotPlot* GetPlot(const char* title);Gets a plot from the current ImPlotContext
ImPlot::GetCurrentPlot¶
IMPLOT_API ImPlotPlot* GetCurrentPlot();Gets the current plot from the current ImPlotContext
ImPlot::BustPlotCache¶
IMPLOT_API void BustPlotCache();Busts the cache for every plot in the current context
ImPlot::ShowPlotContextMenu¶
IMPLOT_API void ShowPlotContextMenu(ImPlotPlot& plot);Shows a plot’s context menu.
Setup Utils¶
ImPlot::SetupLock¶
static inline void SetupLock();Lock Setup and call SetupFinish if necessary. (private API)
Subplot Utils¶
ImPlot::SubplotNextCell¶
IMPLOT_API void SubplotNextCell();Advances to next subplot
ImPlot::ShowSubplotsContextMenu¶
IMPLOT_API void ShowSubplotsContextMenu(ImPlotSubplot& subplot);Shows a subplot’s context menu.
Item Utils¶
ImPlot::BeginItem¶
IMPLOT_API bool BeginItem(const char* label_id, const ImPlotSpec& spec = ImPlotSpec(), const ImVec4& item_col = IMPLOT_AUTO_COL, ImPlotMarker item_mkr = ImPlotMarker_Invalid);Begins a new item. Returns False if the item should not be plotted. Pushes PlotClipRect.
ImPlot::EndItem¶
IMPLOT_API void EndItem();Ends an item (call only if BeginItem returns True). Pops PlotClipRect.
ImPlot::RegisterOrGetItem¶
IMPLOT_API ImPlotItem* RegisterOrGetItem(const char* label_id, ImPlotItemFlags flags, bool* just_created = nullptr);Register or get an existing item from the current plot.
ImPlot::GetItem¶
IMPLOT_API ImPlotItem* GetItem(const char* label_id);Get a plot item from the current plot.
ImPlot::GetCurrentItem¶
IMPLOT_API ImPlotItem* GetCurrentItem();Gets the current item.
ImPlot::BustItemCache¶
IMPLOT_API void BustItemCache();Busts the cache for every item for every plot in the current context.
Axis Utils¶
ImPlot::AnyAxesInputLocked¶
static inline bool AnyAxesInputLocked(ImPlotAxis* axes, int count);Returns True if any enabled axis is locked from user input. (private API)
ImPlot::AllAxesInputLocked¶
static inline bool AllAxesInputLocked(ImPlotAxis* axes, int count);Returns True if all enabled axes are locked from user input. (private API)
ImPlot::AnyAxesHeld¶
static inline bool AnyAxesHeld(ImPlotAxis* axes, int count);(private API)
ImPlot::AnyAxesHovered¶
static inline bool AnyAxesHovered(ImPlotAxis* axes, int count);(private API)
ImPlot::FitThisFrame¶
static inline bool FitThisFrame();Returns True if the user has requested data to be fit. (private API)
ImPlot::FitPointX¶
static inline void FitPointX(double x);Extends the current plot’s axes so that it encompasses a vertical line at x (private API)
ImPlot::FitPointY¶
static inline void FitPointY(double y);Extends the current plot’s axes so that it encompasses a horizontal line at y (private API)
ImPlot::FitPoint¶
static inline void FitPoint(const ImPlotPoint& p);Extends the current plot’s axes so that it encompasses point p (private API)
ImPlot::RangesOverlap¶
static inline bool RangesOverlap(const ImPlotRange& r1, const ImPlotRange& r2);Returns True if two ranges overlap (private API)
ImPlot::ShowAxisContextMenu¶
IMPLOT_API void ShowAxisContextMenu(ImPlotAxis& axis, ImPlotAxis* equal_axis, bool time_allowed = false);Shows an axis’s context menu.
Legend Utils¶
ImPlot::GetLocationPos¶
IMPLOT_API ImVec2 GetLocationPos(const ImRect& outer_rect, const ImVec2& inner_size, ImPlotLocation location, const ImVec2& pad = ImVec2(0,0));Gets the position of an inner rect that is located inside of an outer rect according to an ImPlotLocation and padding amount.
ImPlot::CalcLegendSize¶
IMPLOT_API ImVec2 CalcLegendSize(ImPlotItemGroup& items, const ImVec2& pad, const ImVec2& spacing, bool vertical);Calculates the bounding box size of a legend before clipping.
ImPlot::ClampLegendRect¶
IMPLOT_API bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2& pad);Clips calculated legend size
ImPlot::ShowLegendEntries¶
IMPLOT_API bool ShowLegendEntries(ImPlotItemGroup& items, const ImRect& legend_bb, bool interactable, const ImVec2& pad, const ImVec2& spacing, bool vertical, ImDrawList& DrawList);Renders legend entries into a bounding box
ImPlot::ShowAltLegend¶
IMPLOT_API void ShowAltLegend(const char* title_id, bool vertical = true, const ImVec2 size = ImVec2(0,0), bool interactable = true);Shows an alternate legend for the plot identified by #title_id, outside of the plot frame (can be called before or after of Begin/EndPlot but must occur in the same ImGui window! This is not thoroughly tested nor scrollable!).
ImPlot::ShowLegendContextMenu¶
IMPLOT_API bool ShowLegendContextMenu(ImPlotLegend& legend, bool visible);Shows a legend’s context menu.
Styling Utils¶
ImPlot::GetItemData¶
static inline const ImPlotNextItemData& GetItemData();Get styling data for next item (call between Begin/EndItem) (private API)
ImPlot::IsColorAuto¶
static inline bool IsColorAuto(const ImVec4& col);static inline bool IsColorAuto(ImPlotCol idx);Returns True if a color is set to be automatically determined (private API)
ImPlot::GetAutoColor¶
IMPLOT_API ImVec4 GetAutoColor(ImPlotCol idx);Returns the automatically deduced style color
ImPlot::GetStyleColorVec4¶
static inline ImVec4 GetStyleColorVec4(ImPlotCol idx);(private API)
Returns the style color whether it is automatic or custom set
ImPlot::GetStyleColorU32¶
static inline ImU32 GetStyleColorU32(ImPlotCol idx);(private API)
ImPlot::AddTextVertical¶
IMPLOT_API void AddTextVertical(ImDrawList *DrawList, ImVec2 pos, ImU32 col, const char* text_begin, const char* text_end = nullptr);Draws vertical text. The position is the bottom left of the text rect.
ImPlot::AddTextCentered¶
IMPLOT_API void AddTextCentered(ImDrawList* DrawList, ImVec2 top_center, ImU32 col, const char* text_begin, const char* text_end = nullptr);Draws multiline horizontal text centered.
ImPlot::CalcTextSizeVertical¶
static inline ImVec2 CalcTextSizeVertical(const char *text);Calculates the size of vertical text (private API)
Returns white or black text given background color¶
ImPlot::CalcTextColor¶
static inline ImU32 CalcTextColor(const ImVec4& bg);static inline ImU32 CalcTextColor(ImU32 bg);(private API)
ImPlot::CalcHoverColor¶
static inline ImU32 CalcHoverColor(ImU32 col);Lightens or darkens a color for hover (private API)
ImPlot::ClampLabelPos¶
static inline ImVec2 ClampLabelPos(ImVec2 pos, const ImVec2& size, const ImVec2& Min, const ImVec2& Max);Clamps a label position so that it fits a rect defined by Min/Max (private API)
ImPlot::GetColormapColorU32¶
IMPLOT_API ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap);Returns a color from the Color map given an index >= 0 (modulo will be performed).
ImPlot::NextColormapColorU32¶
IMPLOT_API ImU32 NextColormapColorU32();Returns the next unused colormap color and advances the colormap. Can be used to skip colors if desired.
ImPlot::SampleColormapU32¶
IMPLOT_API ImU32 SampleColormapU32(float t, ImPlotColormap cmap);Linearly interpolates a color from the current colormap given t between 0 and 1.
ImPlot::RenderColorBar¶
IMPLOT_API void RenderColorBar(const ImU32* colors, int size, ImDrawList& DrawList, const ImRect& bounds, bool vert, bool reversed, bool continuous);Render a colormap bar
Render Horizontal/Vertical lines¶
Math and Misc Utils
ImPlot::NiceNum¶
IMPLOT_API double NiceNum(double x, bool round);Rounds x to powers of 2,5 and 10 for generating axis labels (from Graphics Gems 1 Chapter 11.2)
ImPlot::OrderOfMagnitude¶
static inline int OrderOfMagnitude(double val);Computes order of magnitude of double. (private API)
ImPlot::OrderToPrecision¶
static inline int OrderToPrecision(int order);Returns the precision required for a order of magnitude. (private API)
ImPlot::Precision¶
static inline int Precision(double val);Returns a floating point precision to use given a value (private API)
ImPlot::RoundTo¶
static inline double RoundTo(double val, int prec);Round a value to a given precision (private API)
ImPlot::Intersection¶
static inline ImVec2 Intersection(const ImVec2& a1, const ImVec2& a2, const ImVec2& b1, const ImVec2& b2);Returns the intersection point of two lines A and B (assumes they are not parallel!) (private API)
Time Utils¶
ImPlot::IsLeapYear¶
static inline bool IsLeapYear(int year);Returns True if year is leap year (366 days long) (private API)
ImPlot::GetDaysInMonth¶
static inline int GetDaysInMonth(int year, int month);Returns the number of days in a month, accounting for Feb. leap years. #month is zero indexed. (private API)
ImPlot::MakeTime¶
IMPLOT_API ImPlotTime MakeTime(int year, int month = 0, int day = 1, int hour = 0, int min = 0, int sec = 0, int us = 0);Make a timestamp from time components. year[1970-3000], month[0-11], day[1-31], hour[0-23], min[0-59], sec[0-59], us[0,999999]
ImPlot::GetYear¶
IMPLOT_API int GetYear(const ImPlotTime& t);Get year component from timestamp [1970-3000]
ImPlot::GetMonth¶
IMPLOT_API int GetMonth(const ImPlotTime& t);Get month component from timestamp [0-11]
ImPlot::AddTime¶
IMPLOT_API ImPlotTime AddTime(const ImPlotTime& t, ImPlotTimeUnit unit, int count);Adds or subtracts time from a timestamp. #count > 0 to add, < 0 to subtract.
ImPlot::FloorTime¶
IMPLOT_API ImPlotTime FloorTime(const ImPlotTime& t, ImPlotTimeUnit unit);Rounds a timestamp down to nearest unit.
ImPlot::CeilTime¶
IMPLOT_API ImPlotTime CeilTime(const ImPlotTime& t, ImPlotTimeUnit unit);Rounds a timestamp up to the nearest unit.
ImPlot::RoundTime¶
IMPLOT_API ImPlotTime RoundTime(const ImPlotTime& t, ImPlotTimeUnit unit);Rounds a timestamp up or down to the nearest unit.
ImPlot::CombineDateTime¶
IMPLOT_API ImPlotTime CombineDateTime(const ImPlotTime& date_part, const ImPlotTime& time_part);Combines the date of one timestamp with the time-of-day of another timestamp.
ImPlot::Now¶
static inline ImPlotTime Now();Get the current time as a timestamp. (private API)
ImPlot::Today¶
static inline ImPlotTime Today();Get the current date as a timestamp. (private API)
ImPlot::FormatTimeStr¶
IMPLOT_API std::string FormatTimeStr(const ImPlotTime& t, ImPlotTimeFmt fmt, bool use_24_hr_clk);Formats the time part of timestamp t into a buffer according to #fmt
ImPlot::FormatDateStr¶
IMPLOT_API std::string FormatDateStr(const ImPlotTime& t, ImPlotDateFmt fmt, bool use_iso_8601);Formats the date part of timestamp t into a buffer according to #fmt
ImPlot::FormatDateTimeStr¶
IMPLOT_API std::string FormatDateTimeStr(const ImPlotTime& t, ImPlotDateTimeSpec fmt);Formats the time and/or date parts of a timestamp t into a buffer according to #fmt
ImPlot::ShowDatePicker¶
IMPLOT_API bool ShowDatePicker(const char* id, int* level, ImPlotTime* t, const ImPlotTime* t1 = nullptr, const ImPlotTime* t2 = nullptr);Shows a date picker widget block (year/month/day).
#level = 0 for day, 1 for month, 2 for year. Modified by user interaction.
#t will be set when a day is clicked and the function will return True.
#t1 and #t2 are optional dates to highlight.
ImPlot::ShowTimePicker¶
IMPLOT_API bool ShowTimePicker(const char* id, ImPlotTime* t);Shows a time picker widget block (hour/min/sec).
#t will be set when a new hour, minute, or sec is selected or am/pm is toggled, and the function will return True.
Transforms¶
ImPlot::TransformForward_Log10¶
static inline double TransformForward_Log10(double v, void*);(private API)
ImPlot::TransformInverse_Log10¶
static inline double TransformInverse_Log10(double v, void*);(private API)
ImPlot::TransformForward_SymLog¶
static inline double TransformForward_SymLog(double v, void*);(private API)
ImPlot::TransformInverse_SymLog¶
static inline double TransformInverse_SymLog(double v, void*);(private API)
ImPlot::TransformForward_Logit¶
static inline double TransformForward_Logit(double v, void*);(private API)
ImPlot::TransformInverse_Logit¶
static inline double TransformInverse_Logit(double v, void*);(private API)
Formatter_Time_Data (struct)¶
| Member | |
|---|---|
ImPlotTime Time; | |
ImPlotDateTimeSpec Spec; | |
void* UserFormatterData; |