ImPlot’s internal API (implot_internal.h): the structures and helpers that ImPlot is built with.
Use it for custom plot items, or to reach ImPlot’s state. It may change between versions of ImPlot.
The module imgui_bundle.implot.internal, the Python API of ImPlot, from bindings/imgui_bundle/implot/internal.pyi: 91 functions, 21 classes, 4 enums. Each entry gives the Python signature, then the C++ one, then the doc of the C++ header. The sections are the header’s.
implot_internal.h¶
Generic Helpers¶
Computes the common (base-10) logarithm¶
im_log10¶
def im_log10(x: float) -> floatstatic inline float ImLog10(float x);(private API)
im_sinh¶
def im_sinh(x: float) -> floatstatic inline float ImSinh(float x);(private API)
im_asinh¶
def im_asinh(x: float) -> floatstatic inline float ImAsinh(float x);(private API)
im_pos_mod¶
def im_pos_mod(l: int, r: int) -> intstatic inline int ImPosMod(int l, int r);Returns always positive modulo (assumes r != 0) (private API)
im_nan¶
def im_nan(val: float) -> boolstatic inline bool ImNan(double val);Returns True if val is NAN (private API)
im_nan_or_inf¶
def im_nan_or_inf(val: float) -> boolstatic inline bool ImNanOrInf(double val);Returns True if val is NAN or INFINITY (private API)
im_constrain_nan¶
def im_constrain_nan(val: float) -> floatstatic inline double ImConstrainNan(double val);Turns NANs to 0s (private API)
im_constrain_inf¶
def im_constrain_inf(val: float) -> floatstatic inline double ImConstrainInf(double val);Turns infinity to floating point maximums (private API)
im_constrain_log¶
def im_constrain_log(val: float) -> floatstatic 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)
im_constrain_time¶
def im_constrain_time(val: float) -> floatstatic inline double ImConstrainTime(double val);Turns numbers less than 0 to zero (private API)
im_almost_equal¶
def im_almost_equal(v1: float, v2: float, ulp: int = 2) -> boolstatic 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)
im_mix_u32¶
def im_mix_u32(a: ImU32, b: ImU32, s: ImU32) -> ImU32static inline ImU32 ImMixU32(ImU32 a, ImU32 b, ImU32 s);Mix color a and b by factor s in [0 256] (private API)
im_lerp_u32¶
def im_lerp_u32(colors: ImU32, size: int, t: float) -> ImU32static 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)
im_alpha_u32¶
def im_alpha_u32(col: ImU32, alpha: float) -> ImU32static 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 | C++ | |
|---|---|---|---|
us | 0 | ImPlotTimeUnit_Us | microsecond |
ms | 1 | ImPlotTimeUnit_Ms | millisecond |
s | 2 | ImPlotTimeUnit_S | second |
min | 3 | ImPlotTimeUnit_Min | minute |
hr | 4 | ImPlotTimeUnit_Hr | hour |
day | 5 | ImPlotTimeUnit_Day | day |
mo | 6 | ImPlotTimeUnit_Mo | month |
yr | 7 | ImPlotTimeUnit_Yr | year |
count | 8 | ImPlotTimeUnit_COUNT |
DateFmt_ (enum)¶
| Member | Value | C++ | |
|---|---|---|---|
none | 0 | ImPlotDateFmt_None = 0 | |
day_mo | 1 | ImPlotDateFmt_DayMo | 10/3 [ --10-03 ] |
day_mo_yr | 2 | ImPlotDateFmt_DayMoYr | 10/3/91 [ 1991-10-03 ] |
mo_yr | 3 | ImPlotDateFmt_MoYr | Oct 1991 [ 1991-10 ] |
mo | 4 | ImPlotDateFmt_Mo | Oct [ --10 ] |
yr | 5 | ImPlotDateFmt_Yr | 1991 [ 1991 ] |
TimeFmt_ (enum)¶
| Member | Value | C++ | |
|---|---|---|---|
none | 0 | ImPlotTimeFmt_None = 0 | |
us | 1 | ImPlotTimeFmt_Us | .428 552 [ .428 552 ] |
s_us | 2 | ImPlotTimeFmt_SUs | :29.428 552 [ :29.428 552 ] |
s_ms | 3 | ImPlotTimeFmt_SMs | :29.428 [ :29.428 ] |
s | 4 | ImPlotTimeFmt_S | :29 [ :29 ] |
min_s_ms | 5 | ImPlotTimeFmt_MinSMs | 21:29.428 [ 21:29.428 ] |
hr_min_s_ms | 6 | ImPlotTimeFmt_HrMinSMs | 7:21:29.428pm [ 19:21:29.428 ] |
hr_min_s | 7 | ImPlotTimeFmt_HrMinS | 7:21:29pm [ 19:21:29 ] |
hr_min | 8 | ImPlotTimeFmt_HrMin | 7:21pm [ 19:21 ] |
hr | 9 | ImPlotTimeFmt_Hr | 7pm [ 19:00 ] |
MarkerInternal_ (enum)¶
| Member | Value | C++ | |
|---|---|---|---|
im_plot_marker_invalid | -3 | ImPlotMarker_Invalid = -3 |
Structs¶
DateTimeSpec (class)¶
Combined date/time format spec
| Attribute | C++ | |
|---|---|---|
date: DateFmt | ImPlotDateFmt Date; | |
time: TimeFmt | ImPlotTimeFmt Time; | |
use_iso8601: bool | bool UseISO8601; | |
use24_hour_clock: bool | bool Use24HourClock; |
DateTimeSpec.__init__¶
@overload
def __init__(self) -> None
@overload
def __init__(self, date_fmt: DateFmt, time_fmt: TimeFmt, use_24_hr_clk: bool = False, use_iso_8601: bool = False) -> NoneImPlotDateTimeSpec();
ImPlotDateTimeSpec(ImPlotDateFmt date_fmt, ImPlotTimeFmt time_fmt, bool use_24_hr_clk = false, bool use_iso_8601 = false);Time (class)¶
Two part timestamp struct.
| Attribute | C++ | |
|---|---|---|
s: time_t | time_t S; | second part |
us: int | int Us; | microsecond part |
Time.__init__¶
@overload
def __init__(self) -> None
@overload
def __init__(self, s: time_t, us: int = 0) -> NoneImPlotTime();
ImPlotTime(time_t s, int us = 0);Time.roll_over¶
def roll_over(self) -> Nonevoid RollOver();(private API)
Time.to_double¶
def to_double(self) -> floatdouble ToDouble() const;(private API)
Time.from_double¶
@staticmethod
def from_double(t: float) -> Timestatic ImPlotTime FromDouble(double t);(private API)
ColormapData (class)¶
Colormap data storage
| Attribute | C++ | |
|---|---|---|
keys: ImVector_ImU32 | ImVector<ImU32> Keys; | |
key_counts: ImVector_int | ImVector<int> KeyCounts; | |
key_offsets: ImVector_int | ImVector<int> KeyOffsets; | |
tables: ImVector_ImU32 | ImVector<ImU32> Tables; | |
table_sizes: ImVector_int | ImVector<int> TableSizes; | |
table_offsets: ImVector_int | ImVector<int> TableOffsets; | |
text: TextBuffer | ImGuiTextBuffer Text; | |
text_offsets: ImVector_int | ImVector<int> TextOffsets; | |
map: Storage | ImGuiStorage Map; | |
count: int | int Count; |
ColormapData.__init__¶
def __init__(self) -> NoneImPlotColormapData();ColormapData.append¶
def append(self, name: str, keys: ImU32, count: int, qual: bool) -> intint Append(const char* name, const ImU32* keys, int count, bool qual);(private API)
ColormapData.rebuild_tables¶
def rebuild_tables(self) -> Nonevoid RebuildTables();(private API)
ColormapData.is_qual¶
def is_qual(self, cmap: Colormap) -> boolinline bool IsQual(ImPlotColormap cmap) const;(private API)
ColormapData.get_name¶
def get_name(self, cmap: Colormap) -> strinline const char* GetName(ImPlotColormap cmap) const;(private API)
ColormapData.get_index¶
def get_index(self, name: str) -> Colormapinline ImPlotColormap GetIndex(const char* name) const;(private API)
ColormapData.get_keys¶
def get_keys(self, cmap: Colormap) -> ImU32inline const ImU32* GetKeys(ImPlotColormap cmap) const;(private API)
ColormapData.get_key_count¶
def get_key_count(self, cmap: Colormap) -> intinline int GetKeyCount(ImPlotColormap cmap) const;(private API)
ColormapData.get_key_color¶
def get_key_color(self, cmap: Colormap, idx: int) -> ImU32inline ImU32 GetKeyColor(ImPlotColormap cmap, int idx) const;(private API)
ColormapData.set_key_color¶
def set_key_color(self, cmap: Colormap, idx: int, value: ImU32) -> Noneinline void SetKeyColor(ImPlotColormap cmap, int idx, ImU32 value);(private API)
ColormapData.get_table¶
def get_table(self, cmap: Colormap) -> ImU32inline const ImU32* GetTable(ImPlotColormap cmap) const;(private API)
ColormapData.get_table_size¶
def get_table_size(self, cmap: Colormap) -> intinline int GetTableSize(ImPlotColormap cmap) const;(private API)
ColormapData.get_table_color¶
def get_table_color(self, cmap: Colormap, idx: int) -> ImU32inline ImU32 GetTableColor(ImPlotColormap cmap, int idx) const;(private API)
ColormapData.lerp_table¶
def lerp_table(self, cmap: Colormap, t: float) -> ImU32inline ImU32 LerpTable(ImPlotColormap cmap, float t) const;(private API)
PointError (class)¶
ImPlotPoint with positive/negative error values
| Attribute | C++ | |
|---|---|---|
x: float | double X, | |
y: float | Y, | |
neg: float | Neg, | |
pos: float | Pos; |
PointError.__init__¶
@overload
def __init__(self) -> None
@overload
def __init__(self, x: float, y: float, neg: float, pos: float) -> NoneImPlotPointError();
ImPlotPointError(double x, double y, double neg, double pos);Annotation (class)¶
Interior plot label/annotation
| Attribute | C++ | |
|---|---|---|
pos: ImVec2 | ImVec2 Pos; | |
offset: ImVec2 | ImVec2 Offset; | |
color_bg: ImU32 | ImU32 ColorBg; | |
color_fg: ImU32 | ImU32 ColorFg; | |
text_offset: int | int TextOffset; | |
clamp: bool | bool Clamp; |
Annotation.__init__¶
def __init__(self) -> NoneImPlotAnnotation();AnnotationCollection (class)¶
Collection of plot labels
| Attribute | C++ | |
|---|---|---|
text_buffer: TextBuffer | ImGuiTextBuffer TextBuffer; | |
size: int | int Size; |
AnnotationCollection.__init__¶
def __init__(self) -> NoneImPlotAnnotationCollection();AnnotationCollection.append¶
def append(self, pos: ImVec2Like, off: ImVec2Like, bg: ImU32, fg: ImU32, clamp: bool, fmt: str) -> Nonevoid Append(const ImVec2& pos, const ImVec2& off, ImU32 bg, ImU32 fg, bool clamp, const char* fmt, ...);(private API)
AnnotationCollection.get_text¶
def get_text(self, idx: int) -> strconst char* GetText(int idx);(private API)
AnnotationCollection.reset¶
def reset(self) -> Nonevoid Reset();(private API)
Tag (class)¶
| Attribute | C++ | |
|---|---|---|
axis: ImAxis | ImAxis Axis; | |
value: float | double Value; | |
color_bg: ImU32 | ImU32 ColorBg; | |
color_fg: ImU32 | ImU32 ColorFg; | |
text_offset: int | int TextOffset; |
Tag.__init__¶
def __init__(self) -> NoneImPlotTag();TagCollection (class)¶
| Attribute | C++ | |
|---|---|---|
text_buffer: TextBuffer | ImGuiTextBuffer TextBuffer; | |
size: int | int Size; |
TagCollection.__init__¶
def __init__(self) -> NoneImPlotTagCollection();TagCollection.append¶
def append(self, axis: ImAxis, value: float, bg: ImU32, fg: ImU32, fmt: str) -> Nonevoid Append(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, ...);(private API)
TagCollection.get_text¶
def get_text(self, idx: int) -> strconst char* GetText(int idx);(private API)
TagCollection.reset¶
def reset(self) -> Nonevoid Reset();(private API)
Tick (class)¶
Tick mark info
| Attribute | C++ | |
|---|---|---|
plot_pos: float | double PlotPos; | |
pixel_pos: float | float PixelPos; | |
label_size: ImVec2 | ImVec2 LabelSize; | |
text_offset: int | int TextOffset; | |
major: bool | bool Major; | |
show_label: bool | bool ShowLabel; | |
level: int | int Level; | |
idx: int | int Idx; |
Tick.__init__¶
@overload
def __init__(self) -> None
@overload
def __init__(self, value: float, major: bool, level: int, show_label: bool) -> NoneImPlotTick();
ImPlotTick(double value, bool major, int level, bool show_label);Ticker (class)¶
Collection of ticks
| Attribute | C++ | |
|---|---|---|
text_buffer: TextBuffer | ImGuiTextBuffer TextBuffer; | |
max_size: ImVec2 | ImVec2 MaxSize; | |
late_size: ImVec2 | ImVec2 LateSize; | |
levels: int | int Levels; |
Ticker.__init__¶
def __init__(self) -> NoneImPlotTicker();Ticker.add_tick¶
@overload
def add_tick(self, value: float, major: bool, level: int, show_label: bool, label: str) -> Tick
@overload
def add_tick(self, tick: Tick) -> TickImPlotTick& AddTick(double value, bool major, int level, bool show_label, const char* label);
inline ImPlotTick& AddTick(ImPlotTick tick);(private API)
Ticker.get_text¶
@overload
def get_text(self, idx: int) -> str
@overload
def get_text(self, tick: Tick) -> strconst char* GetText(int idx) const;
const char* GetText(const ImPlotTick& tick);(private API)
Ticker.override_size_late¶
def override_size_late(self, size: ImVec2Like) -> Nonevoid OverrideSizeLate(const ImVec2& size);(private API)
Ticker.reset¶
def reset(self) -> Nonevoid Reset();(private API)
Ticker.tick_count¶
def tick_count(self) -> intint TickCount() const;(private API)
Axis (class)¶
Axis state information that must persist after EndPlot
| Attribute | C++ | |
|---|---|---|
id_: ID | ImGuiID ID; | |
flags: AxisFlags | ImPlotAxisFlags Flags; | |
previous_flags: AxisFlags | ImPlotAxisFlags PreviousFlags; | |
range: Range | ImPlotRange Range; | |
range_cond: Cond | ImPlotCond RangeCond; | |
scale: Scale | ImPlotScale Scale; | |
fit_extents: Range | ImPlotRange FitExtents; | |
ortho_axis: Axis | ImPlotAxis* OrthoAxis; | |
constraint_range: Range | ImPlotRange ConstraintRange; | |
constraint_zoom: Range | ImPlotRange ConstraintZoom; | |
ticker: Ticker | ImPlotTicker Ticker; | |
formatter_data: Any | void* FormatterData; | |
linked_min: float | double* LinkedMin; | |
linked_max: float | double* LinkedMax; | |
picker_level: int | int PickerLevel; | |
picker_time_min: Time | ImPlotTime PickerTimeMin, | |
picker_time_max: Time | PickerTimeMax; | |
transform_data: Any | void* TransformData; | |
pixel_min: float | float PixelMin, | |
pixel_max: float | PixelMax; | |
scale_min: float | double ScaleMin, | |
scale_max: float | ScaleMax; | |
scale_to_pixel: float | double ScaleToPixel; | |
datum1: float | float Datum1, | |
datum2: float | Datum2; | |
hover_rect: ImRect | ImRect HoverRect; | |
label_offset: int | int LabelOffset; | |
color_maj: ImU32 | ImU32 ColorMaj, | |
color_min: ImU32 | ColorMin, | |
color_tick: ImU32 | ColorTick, | |
color_txt: ImU32 | ColorTxt, | |
color_bg: ImU32 | ColorBg, | |
color_hov: ImU32 | ColorHov, | |
color_act: ImU32 | ColorAct, | |
color_hi_li: ImU32 | ColorHiLi; | |
enabled: bool | bool Enabled; | |
vertical: bool | bool Vertical; | |
fit_this_frame: bool | bool FitThisFrame; | |
has_range: bool | bool HasRange; | |
has_format_spec: bool | bool HasFormatSpec; | |
show_default_ticks: bool | bool ShowDefaultTicks; | |
hovered: bool | bool Hovered; | |
held: bool | bool Held; |
Axis.__init__¶
def __init__(self) -> NoneImPlotAxis();Axis.reset¶
def reset(self) -> Noneinline void Reset();(private API)
Axis.set_min¶
def set_min(self, _min: float, force: bool = False) -> boolinline bool SetMin(double _min, bool force=false);(private API)
Axis.set_max¶
def set_max(self, _max: float, force: bool = False) -> boolinline bool SetMax(double _max, bool force=false);(private API)
Axis.set_range¶
@overload
def set_range(self, v1: float, v2: float) -> None
@overload
def set_range(self, range: Range) -> Noneinline void SetRange(double v1, double v2);
inline void SetRange(const ImPlotRange& range);(private API)
Axis.set_aspect¶
def set_aspect(self, unit_per_pix: float) -> Noneinline void SetAspect(double unit_per_pix);(private API)
Axis.pixel_size¶
def pixel_size(self) -> floatinline float PixelSize() const;(private API)
Axis.get_aspect¶
def get_aspect(self) -> floatinline double GetAspect() const;(private API)
Axis.constrain¶
def constrain(self) -> Noneinline void Constrain();(private API)
Axis.update_transform_cache¶
def update_transform_cache(self) -> Noneinline void UpdateTransformCache();(private API)
Axis.plot_to_pixels¶
def plot_to_pixels(self, plt: float) -> floatinline float PlotToPixels(double plt) const;(private API)
Axis.pixels_to_plot¶
def pixels_to_plot(self, pix: float) -> floatinline double PixelsToPlot(float pix) const;(private API)
Axis.extend_fit¶
def extend_fit(self, v: float) -> Noneinline void ExtendFit(double v);(private API)
Axis.extend_fit_with¶
def extend_fit_with(self, alt: Axis, v: float, v_alt: float) -> Noneinline void ExtendFitWith(ImPlotAxis& alt, double v, double v_alt);(private API)
Axis.apply_fit¶
def apply_fit(self, padding: float) -> Noneinline void ApplyFit(float padding);(private API)
Axis.has_label¶
def has_label(self) -> boolinline bool HasLabel() const;(private API)
Axis.has_grid_lines¶
def has_grid_lines(self) -> boolinline bool HasGridLines() const;(private API)
Axis.has_tick_labels¶
def has_tick_labels(self) -> boolinline bool HasTickLabels() const;(private API)
Axis.has_tick_marks¶
def has_tick_marks(self) -> boolinline bool HasTickMarks() const;(private API)
Axis.will_render¶
def will_render(self) -> boolinline bool WillRender() const;(private API)
Axis.is_opposite¶
def is_opposite(self) -> boolinline bool IsOpposite() const;(private API)
Axis.is_inverted¶
def is_inverted(self) -> boolinline bool IsInverted() const;(private API)
Axis.is_foreground¶
def is_foreground(self) -> boolinline bool IsForeground() const;(private API)
Axis.is_auto_fitting¶
def is_auto_fitting(self) -> boolinline bool IsAutoFitting() const;(private API)
Axis.can_init_fit¶
def can_init_fit(self) -> boolinline bool CanInitFit() const;(private API)
Axis.is_range_locked¶
def is_range_locked(self) -> boolinline bool IsRangeLocked() const;(private API)
Axis.is_locked_min¶
def is_locked_min(self) -> boolinline bool IsLockedMin() const;(private API)
Axis.is_locked_max¶
def is_locked_max(self) -> boolinline bool IsLockedMax() const;(private API)
Axis.is_locked¶
def is_locked(self) -> boolinline bool IsLocked() const;(private API)
Axis.is_input_locked_min¶
def is_input_locked_min(self) -> boolinline bool IsInputLockedMin() const;(private API)
Axis.is_input_locked_max¶
def is_input_locked_max(self) -> boolinline bool IsInputLockedMax() const;(private API)
Axis.is_input_locked¶
def is_input_locked(self) -> boolinline bool IsInputLocked() const;(private API)
Axis.has_menus¶
def has_menus(self) -> boolinline bool HasMenus() const;(private API)
Axis.is_pan_locked¶
def is_pan_locked(self, increasing: bool) -> boolinline bool IsPanLocked(bool increasing);(private API)
Axis.push_links¶
def push_links(self) -> Nonevoid PushLinks();(private API)
Axis.pull_links¶
def pull_links(self) -> Nonevoid PullLinks();(private API)
AlignmentData (class)¶
Align plots group data
| Attribute | C++ | |
|---|---|---|
vertical: bool | bool Vertical; | |
pad_a: float | float PadA; | |
pad_b: float | float PadB; | |
pad_a_max: float | float PadAMax; | |
pad_b_max: float | float PadBMax; |
AlignmentData.__init__¶
def __init__(self) -> NoneImPlotAlignmentData();AlignmentData.begin¶
def begin(self) -> Nonevoid Begin();(private API)
AlignmentData.update¶
def update(self, pad_a: float, pad_b: float, delta_a: float, delta_b: float) -> Tuple[float, float, float, float]void Update(float& pad_a, float& pad_b, float& delta_a, float& delta_b);(private API)
AlignmentData.end¶
def end(self) -> Nonevoid End();(private API)
AlignmentData.reset¶
def reset(self) -> Nonevoid Reset();(private API)
Item (class)¶
State information for Plot items
| Attribute | C++ | |
|---|---|---|
id_: ID | ImGuiID ID; | |
color: ImU32 | ImU32 Color; | |
marker: Marker | ImPlotMarker Marker; | |
legend_hover_rect: ImRect | ImRect LegendHoverRect; | |
name_offset: int | int NameOffset; | |
show: bool | bool Show; | |
legend_hovered: bool | bool LegendHovered; | |
seen_this_frame: bool | bool SeenThisFrame; |
Item.__init__¶
def __init__(self) -> NoneImPlotItem();Legend (class)¶
Holds Legend state
| Attribute | C++ | |
|---|---|---|
flags: LegendFlags | ImPlotLegendFlags Flags; | |
previous_flags: LegendFlags | ImPlotLegendFlags PreviousFlags; | |
location: Location | ImPlotLocation Location; | |
previous_location: Location | ImPlotLocation PreviousLocation; | |
scroll: ImVec2 | ImVec2 Scroll; | |
indices: ImVector_int | ImVector<int> Indices; | |
labels: TextBuffer | ImGuiTextBuffer Labels; | |
rect: ImRect | ImRect Rect; | |
rect_clamped: ImRect | ImRect RectClamped; | |
hovered: bool | bool Hovered; | |
held: bool | bool Held; | |
can_go_inside: bool | bool CanGoInside; |
Legend.__init__¶
def __init__(self) -> NoneImPlotLegend();Legend.reset¶
def reset(self) -> Nonevoid Reset();(private API)
ItemGroup (class)¶
Holds Items and Legend data
| Attribute | C++ | |
|---|---|---|
id_: ID | ImGuiID ID; | |
legend: Legend | ImPlotLegend Legend; | |
colormap_idx: int | int ColormapIdx; | |
marker_idx: Marker | ImPlotMarker MarkerIdx; |
ItemGroup.__init__¶
def __init__(self) -> NoneImPlotItemGroup();ItemGroup.get_item_count¶
def get_item_count(self) -> intint GetItemCount() const;(private API)
ItemGroup.get_item_id¶
def get_item_id(self, label_id: str) -> IDImGuiID GetItemID(const char* label_id);(private API)
ItemGroup.get_item¶
@overload
def get_item(self, id_: ID) -> Item
@overload
def get_item(self, label_id: str) -> ItemImPlotItem* GetItem(ImGuiID id);
ImPlotItem* GetItem(const char* label_id);(private API)
ItemGroup.get_or_add_item¶
def get_or_add_item(self, id_: ID) -> ItemImPlotItem* GetOrAddItem(ImGuiID id);(private API)
ItemGroup.get_item_by_index¶
def get_item_by_index(self, i: int) -> ItemImPlotItem* GetItemByIndex(int i);(private API)
ItemGroup.get_item_index¶
def get_item_index(self, item: Item) -> intint GetItemIndex(ImPlotItem* item);(private API)
ItemGroup.get_legend_count¶
def get_legend_count(self) -> intint GetLegendCount() const;(private API)
ItemGroup.get_legend_item¶
def get_legend_item(self, i: int) -> ItemImPlotItem* GetLegendItem(int i);(private API)
ItemGroup.get_legend_label¶
def get_legend_label(self, i: int) -> strconst char* GetLegendLabel(int i);(private API)
ItemGroup.reset¶
def reset(self) -> Nonevoid Reset();(private API)
Plot (class)¶
Holds Plot state information that must persist after EndPlot
| Attribute | C++ | |
|---|---|---|
id_: ID | ImGuiID ID; | |
flags: Flags | ImPlotFlags Flags; | |
previous_flags: Flags | ImPlotFlags PreviousFlags; | |
mouse_text_location: Location | ImPlotLocation MouseTextLocation; | |
mouse_text_flags: MouseTextFlags | ImPlotMouseTextFlags MouseTextFlags; | |
text_buffer: TextBuffer | ImGuiTextBuffer TextBuffer; | |
items: ItemGroup | ImPlotItemGroup Items; | |
current_x: ImAxis | ImAxis CurrentX; | |
current_y: ImAxis | ImAxis CurrentY; | |
frame_rect: ImRect | ImRect FrameRect; | |
canvas_rect: ImRect | ImRect CanvasRect; | |
plot_rect: ImRect | ImRect PlotRect; | |
axes_rect: ImRect | ImRect AxesRect; | |
select_rect: ImRect | ImRect SelectRect; | |
select_start: ImVec2 | ImVec2 SelectStart; | |
title_offset: int | int TitleOffset; | |
just_created: bool | bool JustCreated; | |
initialized: bool | bool Initialized; | |
setup_locked: bool | bool SetupLocked; | |
fit_this_frame: bool | bool FitThisFrame; | |
hovered: bool | bool Hovered; | |
held: bool | bool Held; | |
selecting: bool | bool Selecting; | |
selected: bool | bool Selected; | |
context_locked: bool | bool ContextLocked; |
Plot.__init__¶
def __init__(self) -> NoneImPlotPlot();Plot.is_input_locked¶
def is_input_locked(self) -> boolinline bool IsInputLocked() const;(private API)
Plot.clear_text_buffer¶
def clear_text_buffer(self) -> Noneinline void ClearTextBuffer();(private API)
Plot.set_title¶
def set_title(self, title: str) -> Noneinline void SetTitle(const char* title);(private API)
Plot.has_title¶
def has_title(self) -> boolinline bool HasTitle() const;(private API)
Plot.get_title¶
def get_title(self) -> strinline const char* GetTitle() const;(private API)
Plot.x_axis¶
def x_axis(self, i: int) -> Axisinline ImPlotAxis& XAxis(int i);(private API)
Plot.y_axis¶
def y_axis(self, i: int) -> Axisinline ImPlotAxis& YAxis(int i);(private API)
Plot.enabled_axes_x¶
def enabled_axes_x(self) -> intinline int EnabledAxesX();(private API)
Plot.enabled_axes_y¶
def enabled_axes_y(self) -> intinline int EnabledAxesY();(private API)
Plot.set_axis_label¶
def set_axis_label(self, axis: Axis, label: str) -> Noneinline void SetAxisLabel(ImPlotAxis& axis, const char* label);(private API)
Plot.get_axis_label¶
def get_axis_label(self, axis: Axis) -> strinline const char* GetAxisLabel(const ImPlotAxis& axis) const;(private API)
Subplot (class)¶
Holds subplot data that must persist after EndSubplot
| Attribute | C++ | |
|---|---|---|
id_: ID | ImGuiID ID; | |
flags: SubplotFlags | ImPlotSubplotFlags Flags; | |
previous_flags: SubplotFlags | ImPlotSubplotFlags PreviousFlags; | |
items: ItemGroup | ImPlotItemGroup Items; | |
rows: int | int Rows; | |
cols: int | int Cols; | |
current_idx: int | int CurrentIdx; | |
frame_rect: ImRect | ImRect FrameRect; | |
grid_rect: ImRect | ImRect GridRect; | |
cell_size: ImVec2 | ImVec2 CellSize; | |
row_ratios: ImVector_float | ImVector<float> RowRatios; | |
col_ratios: ImVector_float | ImVector<float> ColRatios; | |
temp_sizes: np.ndarray | float TempSizes[2]; | ndarray[type=float, size=2] |
frame_hovered: bool | bool FrameHovered; | |
has_title: bool | bool HasTitle; |
Subplot.__init__¶
def __init__(self) -> NoneImPlotSubplot();NextPlotData (class)¶
Temporary data storage for upcoming plot
NextPlotData.__init__¶
def __init__(self) -> NoneImPlotNextPlotData();NextPlotData.reset¶
def reset(self) -> Nonevoid Reset();(private API)
NextItemData (class)¶
Temporary data storage for upcoming item
| Attribute | C++ | |
|---|---|---|
spec: Spec | ImPlotSpec Spec; | |
render_line: bool | bool RenderLine; | |
render_fill: bool | bool RenderFill; | |
render_marker_line: bool | bool RenderMarkerLine; | |
render_marker_fill: bool | bool RenderMarkerFill; | |
render_markers: bool | bool RenderMarkers; | |
has_hidden: bool | bool HasHidden; | |
hidden: bool | bool Hidden; | |
hidden_cond: Cond | ImPlotCond HiddenCond; |
NextItemData.__init__¶
def __init__(self) -> NoneImPlotNextItemData();NextItemData.reset¶
def reset(self) -> Nonevoid Reset();(private API)
Context (class)¶
Holds state information that must persist between calls to BeginPlot()/EndPlot()
| Attribute | C++ | |
|---|---|---|
current_plot: Plot | ImPlotPlot* CurrentPlot; | |
current_subplot: Subplot | ImPlotSubplot* CurrentSubplot; | |
current_items: ItemGroup | ImPlotItemGroup* CurrentItems; | |
current_item: Item | ImPlotItem* CurrentItem; | |
previous_item: Item | ImPlotItem* PreviousItem; | |
c_ticker: Ticker | ImPlotTicker CTicker; | |
annotations: AnnotationCollection | ImPlotAnnotationCollection Annotations; | |
tags: TagCollection | ImPlotTagCollection Tags; | |
style: Style | ImPlotStyle Style; | |
color_modifiers: ImVector_ColorMod | ImVector<ImGuiColorMod> ColorModifiers; | |
style_modifiers: ImVector_StyleMod | ImVector<ImGuiStyleMod> StyleModifiers; | |
colormap_data: ColormapData | ImPlotColormapData ColormapData; | |
temp_int1: ImVector_int | ImVector<int> TempInt1; | |
digital_plot_item_cnt: int | int DigitalPlotItemCnt; | |
digital_plot_offset: int | int DigitalPlotOffset; | |
next_plot_data: NextPlotData | ImPlotNextPlotData NextPlotData; | |
next_item_data: NextItemData | ImPlotNextItemData NextItemData; | |
input_map: InputMap | ImPlotInputMap InputMap; | |
open_context_this_frame: bool | bool OpenContextThisFrame; | |
mouse_pos_string_builder: TextBuffer | ImGuiTextBuffer MousePosStringBuilder; | |
sort_items: ItemGroup | ImPlotItemGroup* SortItems; | |
current_alignment_h: AlignmentData | ImPlotAlignmentData* CurrentAlignmentH; | |
current_alignment_v: AlignmentData | ImPlotAlignmentData* CurrentAlignmentV; | |
can_drag_plot_in_node_editor: bool | bool CanDragPlotInNodeEditor = false; |
Context.__init__¶
def __init__(self, c_ticker: Optional[Ticker] = None, annotations: Optional[AnnotationCollection] = None, tags: Optional[TagCollection] = None, style: Optional[Style] = None, color_modifiers: Optional[ImVector_ColorMod] = None, style_modifiers: Optional[ImVector_StyleMod] = None, colormap_data: Optional[ColormapData] = None, temp_int1: Optional[ImVector_int] = None, digital_plot_item_cnt: int = int(), digital_plot_offset: int = int(), next_plot_data: Optional[NextPlotData] = None, next_item_data: Optional[NextItemData] = None, input_map: Optional[InputMap] = None, open_context_this_frame: bool = bool(), mouse_pos_string_builder: Optional[TextBuffer] = None, can_drag_plot_in_node_editor: bool = False) -> NoneAuto-generated default constructor with named params
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
* CTicker: Ticker()
* Annotations: AnnotationCollection()
* Tags: TagCollection()
* Style: Style()
* ColorModifiers: ImVector_ColorMod()
* StyleModifiers: ImVector_StyleMod()
* ColormapData: ColormapData()
* TempInt1: ImVector_int()
* NextPlotData: NextPlotData()
* NextItemData: NextItemData()
* InputMap: InputMap()
* MousePosStringBuilder: TextBuffer()
Context Utils¶
initialize¶
def initialize(ctx: Context) -> NoneIMPLOT_API void Initialize(ImPlotContext* ctx);Initializes an ImPlotContext
reset_ctx_for_next_plot¶
def reset_ctx_for_next_plot(ctx: Context) -> NoneIMPLOT_API void ResetCtxForNextPlot(ImPlotContext* ctx);Resets an ImPlot context for the next call to BeginPlot
reset_ctx_for_next_aligned_plots¶
def reset_ctx_for_next_aligned_plots(ctx: Context) -> NoneIMPLOT_API void ResetCtxForNextAlignedPlots(ImPlotContext* ctx);Resets an ImPlot context for the next call to BeginAlignedPlots
reset_ctx_for_next_subplot¶
def reset_ctx_for_next_subplot(ctx: Context) -> NoneIMPLOT_API void ResetCtxForNextSubplot(ImPlotContext* ctx);Resets an ImPlot context for the next call to BeginSubplot
Plot Utils¶
get_plot¶
def get_plot(title: str) -> PlotIMPLOT_API ImPlotPlot* GetPlot(const char* title);Gets a plot from the current ImPlotContext
get_current_plot¶
def get_current_plot() -> PlotIMPLOT_API ImPlotPlot* GetCurrentPlot();Gets the current plot from the current ImPlotContext
bust_plot_cache¶
def bust_plot_cache() -> NoneIMPLOT_API void BustPlotCache();Busts the cache for every plot in the current context
show_plot_context_menu¶
def show_plot_context_menu(plot: Plot) -> NoneIMPLOT_API void ShowPlotContextMenu(ImPlotPlot& plot);Shows a plot’s context menu.
Setup Utils¶
setup_lock¶
def setup_lock() -> Nonestatic inline void SetupLock();Lock Setup and call SetupFinish if necessary. (private API)
Subplot Utils¶
subplot_next_cell¶
def subplot_next_cell() -> NoneIMPLOT_API void SubplotNextCell();Advances to next subplot
show_subplots_context_menu¶
def show_subplots_context_menu(subplot: Subplot) -> NoneIMPLOT_API void ShowSubplotsContextMenu(ImPlotSubplot& subplot);Shows a subplot’s context menu.
Item Utils¶
begin_item¶
def begin_item(label_id: str, spec: Optional[Spec] = None, item_col: Optional[ImVec4Like] = None, item_mkr: Optional[Marker] = None) -> boolIMPLOT_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.
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
* spec: Spec()
* item_col: IMPLOT_AUTO_COL
* item_mkr: Marker_Invalid
end_item¶
def end_item() -> NoneIMPLOT_API void EndItem();Ends an item (call only if BeginItem returns True). Pops PlotClipRect.
register_or_get_item¶
def register_or_get_item(label_id: str, flags: ItemFlags, just_created: Optional[bool] = None) -> Tuple[Item, Optional[bool]]IMPLOT_API ImPlotItem* RegisterOrGetItem(const char* label_id, ImPlotItemFlags flags, bool* just_created = nullptr);Register or get an existing item from the current plot.
get_item¶
def get_item(label_id: str) -> ItemIMPLOT_API ImPlotItem* GetItem(const char* label_id);Get a plot item from the current plot.
get_current_item¶
def get_current_item() -> ItemIMPLOT_API ImPlotItem* GetCurrentItem();Gets the current item.
bust_item_cache¶
def bust_item_cache() -> NoneIMPLOT_API void BustItemCache();Busts the cache for every item for every plot in the current context.
Axis Utils¶
any_axes_input_locked¶
def any_axes_input_locked(axes: Axis, count: int) -> boolstatic inline bool AnyAxesInputLocked(ImPlotAxis* axes, int count);Returns True if any enabled axis is locked from user input. (private API)
all_axes_input_locked¶
def all_axes_input_locked(axes: Axis, count: int) -> boolstatic inline bool AllAxesInputLocked(ImPlotAxis* axes, int count);Returns True if all enabled axes are locked from user input. (private API)
any_axes_held¶
def any_axes_held(axes: Axis, count: int) -> boolstatic inline bool AnyAxesHeld(ImPlotAxis* axes, int count);(private API)
any_axes_hovered¶
def any_axes_hovered(axes: Axis, count: int) -> boolstatic inline bool AnyAxesHovered(ImPlotAxis* axes, int count);(private API)
fit_this_frame¶
def fit_this_frame() -> boolstatic inline bool FitThisFrame();Returns True if the user has requested data to be fit. (private API)
fit_point_x¶
def fit_point_x(x: float) -> Nonestatic inline void FitPointX(double x);Extends the current plot’s axes so that it encompasses a vertical line at x (private API)
fit_point_y¶
def fit_point_y(y: float) -> Nonestatic inline void FitPointY(double y);Extends the current plot’s axes so that it encompasses a horizontal line at y (private API)
fit_point¶
def fit_point(p: Point) -> Nonestatic inline void FitPoint(const ImPlotPoint& p);Extends the current plot’s axes so that it encompasses point p (private API)
ranges_overlap¶
def ranges_overlap(r1: Range, r2: Range) -> boolstatic inline bool RangesOverlap(const ImPlotRange& r1, const ImPlotRange& r2);Returns True if two ranges overlap (private API)
show_axis_context_menu¶
def show_axis_context_menu(axis: Axis, equal_axis: Axis, time_allowed: bool = False) -> NoneIMPLOT_API void ShowAxisContextMenu(ImPlotAxis& axis, ImPlotAxis* equal_axis, bool time_allowed = false);Shows an axis’s context menu.
Legend Utils¶
get_location_pos¶
def get_location_pos(outer_rect: ImRect, inner_size: ImVec2Like, location: Location, pad: Optional[ImVec2Like] = None) -> ImVec2IMPLOT_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.
Python bindings defaults:
If pad is None, then its default value will be: ImVec2(0,0)
calc_legend_size¶
def calc_legend_size(items: ItemGroup, pad: ImVec2Like, spacing: ImVec2Like, vertical: bool) -> ImVec2IMPLOT_API ImVec2 CalcLegendSize(ImPlotItemGroup& items, const ImVec2& pad, const ImVec2& spacing, bool vertical);Calculates the bounding box size of a legend before clipping.
clamp_legend_rect¶
def clamp_legend_rect(legend_rect: ImRect, outer_rect: ImRect, pad: ImVec2Like) -> boolIMPLOT_API bool ClampLegendRect(ImRect& legend_rect, const ImRect& outer_rect, const ImVec2& pad);Clips calculated legend size
show_legend_entries¶
def show_legend_entries(items: ItemGroup, legend_bb: ImRect, interactable: bool, pad: ImVec2Like, spacing: ImVec2Like, vertical: bool, draw_list: ImDrawList) -> boolIMPLOT_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
show_alt_legend¶
def show_alt_legend(title_id: str, vertical: bool = True, size: Optional[ImVec2Like] = None, interactable: bool = True) -> NoneIMPLOT_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!).
Python bindings defaults:
If size is None, then its default value will be: ImVec2(0,0)
show_legend_context_menu¶
def show_legend_context_menu(legend: Legend, visible: bool) -> boolIMPLOT_API bool ShowLegendContextMenu(ImPlotLegend& legend, bool visible);Shows a legend’s context menu.
Styling Utils¶
get_item_data¶
def get_item_data() -> NextItemDatastatic inline const ImPlotNextItemData& GetItemData();Get styling data for next item (call between Begin/EndItem) (private API)
is_color_auto¶
@overload
def is_color_auto(col: ImVec4Like) -> bool
@overload
def is_color_auto(idx: Col) -> boolstatic 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)
get_auto_color¶
def get_auto_color(idx: Col) -> ImVec4IMPLOT_API ImVec4 GetAutoColor(ImPlotCol idx);Returns the automatically deduced style color
get_style_color_vec4¶
def get_style_color_vec4(idx: Col) -> ImVec4static inline ImVec4 GetStyleColorVec4(ImPlotCol idx);(private API)
Returns the style color whether it is automatic or custom set
get_style_color_u32¶
def get_style_color_u32(idx: Col) -> ImU32static inline ImU32 GetStyleColorU32(ImPlotCol idx);(private API)
add_text_vertical¶
def add_text_vertical(draw_list: ImDrawList, pos: ImVec2Like, col: ImU32, text_begin: str, text_end: Optional[str] = None) -> NoneIMPLOT_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.
add_text_centered¶
def add_text_centered(draw_list: ImDrawList, top_center: ImVec2Like, col: ImU32, text_begin: str, text_end: Optional[str] = None) -> NoneIMPLOT_API void AddTextCentered(ImDrawList* DrawList, ImVec2 top_center, ImU32 col, const char* text_begin, const char* text_end = nullptr);Draws multiline horizontal text centered.
calc_text_size_vertical¶
def calc_text_size_vertical(text: str) -> ImVec2static inline ImVec2 CalcTextSizeVertical(const char *text);Calculates the size of vertical text (private API)
Returns white or black text given background color¶
calc_text_color¶
@overload
def calc_text_color(bg: ImVec4Like) -> ImU32
@overload
def calc_text_color(bg: ImU32) -> ImU32static inline ImU32 CalcTextColor(const ImVec4& bg);
static inline ImU32 CalcTextColor(ImU32 bg);(private API)
calc_hover_color¶
def calc_hover_color(col: ImU32) -> ImU32static inline ImU32 CalcHoverColor(ImU32 col);Lightens or darkens a color for hover (private API)
clamp_label_pos¶
def clamp_label_pos(pos: ImVec2Like, size: ImVec2Like, min: ImVec2Like, max: ImVec2Like) -> ImVec2static 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)
get_colormap_color_u32¶
def get_colormap_color_u32(idx: int, cmap: Colormap) -> ImU32IMPLOT_API ImU32 GetColormapColorU32(int idx, ImPlotColormap cmap);Returns a color from the Color map given an index >= 0 (modulo will be performed).
next_colormap_color_u32¶
def next_colormap_color_u32() -> ImU32IMPLOT_API ImU32 NextColormapColorU32();Returns the next unused colormap color and advances the colormap. Can be used to skip colors if desired.
sample_colormap_u32¶
def sample_colormap_u32(t: float, cmap: Colormap) -> ImU32IMPLOT_API ImU32 SampleColormapU32(float t, ImPlotColormap cmap);Linearly interpolates a color from the current colormap given t between 0 and 1.
render_color_bar¶
def render_color_bar(colors: ImU32, size: int, draw_list: ImDrawList, bounds: ImRect, vert: bool, reversed: bool, continuous: bool) -> NoneIMPLOT_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
nice_num¶
def nice_num(x: float, round: bool) -> floatIMPLOT_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)
order_of_magnitude¶
def order_of_magnitude(val: float) -> intstatic inline int OrderOfMagnitude(double val);Computes order of magnitude of double. (private API)
order_to_precision¶
def order_to_precision(order: int) -> intstatic inline int OrderToPrecision(int order);Returns the precision required for a order of magnitude. (private API)
precision¶
def precision(val: float) -> intstatic inline int Precision(double val);Returns a floating point precision to use given a value (private API)
round_to¶
def round_to(val: float, prec: int) -> floatstatic inline double RoundTo(double val, int prec);Round a value to a given precision (private API)
intersection¶
def intersection(a1: ImVec2Like, a2: ImVec2Like, b1: ImVec2Like, b2: ImVec2Like) -> ImVec2static 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¶
is_leap_year¶
def is_leap_year(year: int) -> boolstatic inline bool IsLeapYear(int year);Returns True if year is leap year (366 days long) (private API)
get_days_in_month¶
def get_days_in_month(year: int, month: int) -> intstatic 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)
make_time¶
def make_time(year: int, month: int = 0, day: int = 1, hour: int = 0, min: int = 0, sec: int = 0, us: int = 0) -> TimeIMPLOT_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]
get_year¶
def get_year(t: Time) -> intIMPLOT_API int GetYear(const ImPlotTime& t);Get year component from timestamp [1970-3000]
get_month¶
def get_month(t: Time) -> intIMPLOT_API int GetMonth(const ImPlotTime& t);Get month component from timestamp [0-11]
add_time¶
def add_time(t: Time, unit: TimeUnit, count: int) -> TimeIMPLOT_API ImPlotTime AddTime(const ImPlotTime& t, ImPlotTimeUnit unit, int count);Adds or subtracts time from a timestamp. #count > 0 to add, < 0 to subtract.
floor_time¶
def floor_time(t: Time, unit: TimeUnit) -> TimeIMPLOT_API ImPlotTime FloorTime(const ImPlotTime& t, ImPlotTimeUnit unit);Rounds a timestamp down to nearest unit.
ceil_time¶
def ceil_time(t: Time, unit: TimeUnit) -> TimeIMPLOT_API ImPlotTime CeilTime(const ImPlotTime& t, ImPlotTimeUnit unit);Rounds a timestamp up to the nearest unit.
round_time¶
def round_time(t: Time, unit: TimeUnit) -> TimeIMPLOT_API ImPlotTime RoundTime(const ImPlotTime& t, ImPlotTimeUnit unit);Rounds a timestamp up or down to the nearest unit.
combine_date_time¶
def combine_date_time(date_part: Time, time_part: Time) -> TimeIMPLOT_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.
now¶
def now() -> Timestatic inline ImPlotTime Now();Get the current time as a timestamp. (private API)
today¶
def today() -> Timestatic inline ImPlotTime Today();Get the current date as a timestamp. (private API)
format_time_str¶
def format_time_str(t: Time, fmt: TimeFmt, use_24_hr_clk: bool) -> strIMPLOT_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
format_date_str¶
def format_date_str(t: Time, fmt: DateFmt, use_iso_8601: bool) -> strIMPLOT_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
format_date_time_str¶
def format_date_time_str(t: Time, fmt: DateTimeSpec) -> strIMPLOT_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
show_date_picker¶
def show_date_picker(id_: str, level: int, t: Time, t1: Optional[Time] = None, t2: Optional[Time] = None) -> Tuple[bool, int]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.
show_time_picker¶
def show_time_picker(id_: str, t: Time) -> boolIMPLOT_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¶
transform_forward_log10¶
def transform_forward_log10(v: float, param_1: Any) -> floatstatic inline double TransformForward_Log10(double v, void*);(private API)
transform_inverse_log10¶
def transform_inverse_log10(v: float, param_1: Any) -> floatstatic inline double TransformInverse_Log10(double v, void*);(private API)
transform_forward_sym_log¶
def transform_forward_sym_log(v: float, param_1: Any) -> floatstatic inline double TransformForward_SymLog(double v, void*);(private API)
transform_inverse_sym_log¶
def transform_inverse_sym_log(v: float, param_1: Any) -> floatstatic inline double TransformInverse_SymLog(double v, void*);(private API)
transform_forward_logit¶
def transform_forward_logit(v: float, param_1: Any) -> floatstatic inline double TransformForward_Logit(double v, void*);(private API)
transform_inverse_logit¶
def transform_inverse_logit(v: float, param_1: Any) -> floatstatic inline double TransformInverse_Logit(double v, void*);(private API)
Formatter_Time_Data (class)¶
| Attribute | C++ | |
|---|---|---|
time: Time | ImPlotTime Time; | |
spec: DateTimeSpec | ImPlotDateTimeSpec Spec; | |
user_formatter_data: Any | void* UserFormatterData; |
Formatter_Time_Data.__init__¶
def __init__(self, time: Optional[Time] = None, spec: Optional[DateTimeSpec] = None) -> NoneAuto-generated default constructor with named params
Python bindings defaults:
If any of the params below is None, then its default value below will be used:
* Time: Time()
* Spec: DateTimeSpec()