Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

implot.internal

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) -> float
static inline float ImLog10(float x);

(private API)

im_sinh

def im_sinh(x: float) -> float
static inline float ImSinh(float x);

(private API)

im_asinh

def im_asinh(x: float) -> float
static inline float ImAsinh(float x);

(private API)

im_pos_mod

def im_pos_mod(l: int, r: int) -> int
static inline int ImPosMod(int l, int r);

Returns always positive modulo (assumes r != 0) (private API)

im_nan

def im_nan(val: float) -> bool
static inline bool ImNan(double val);

Returns True if val is NAN (private API)

im_nan_or_inf

def im_nan_or_inf(val: float) -> bool
static inline bool ImNanOrInf(double val);

Returns True if val is NAN or INFINITY (private API)

im_constrain_nan

def im_constrain_nan(val: float) -> float
static inline double ImConstrainNan(double val);

Turns NANs to 0s (private API)

im_constrain_inf

def im_constrain_inf(val: float) -> float
static inline double ImConstrainInf(double val);

Turns infinity to floating point maximums (private API)

im_constrain_log

def im_constrain_log(val: float) -> float
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)

im_constrain_time

def im_constrain_time(val: float) -> float
static 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) -> bool
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)

im_mix_u32

def im_mix_u32(a: ImU32, b: ImU32, s: ImU32) -> ImU32
static 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) -> ImU32
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)

im_alpha_u32

def im_alpha_u32(col: ImU32, alpha: float) -> ImU32
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)

MemberValueC++
us0ImPlotTimeUnit_Usmicrosecond
ms1ImPlotTimeUnit_Msmillisecond
s2ImPlotTimeUnit_Ssecond
min3ImPlotTimeUnit_Minminute
hr4ImPlotTimeUnit_Hrhour
day5ImPlotTimeUnit_Dayday
mo6ImPlotTimeUnit_Momonth
yr7ImPlotTimeUnit_Yryear
count8ImPlotTimeUnit_COUNT

DateFmt_ (enum)

MemberValueC++
none0ImPlotDateFmt_None = 0
day_mo1ImPlotDateFmt_DayMo10/3 [ --10-03 ]
day_mo_yr2ImPlotDateFmt_DayMoYr10/3/91 [ 1991-10-03 ]
mo_yr3ImPlotDateFmt_MoYrOct 1991 [ 1991-10 ]
mo4ImPlotDateFmt_MoOct [ --10 ]
yr5ImPlotDateFmt_Yr1991 [ 1991 ]

TimeFmt_ (enum)

MemberValueC++
none0ImPlotTimeFmt_None = 0
us1ImPlotTimeFmt_Us.428 552 [ .428 552 ]
s_us2ImPlotTimeFmt_SUs:29.428 552 [ :29.428 552 ]
s_ms3ImPlotTimeFmt_SMs:29.428 [ :29.428 ]
s4ImPlotTimeFmt_S:29 [ :29 ]
min_s_ms5ImPlotTimeFmt_MinSMs21:29.428 [ 21:29.428 ]
hr_min_s_ms6ImPlotTimeFmt_HrMinSMs7:21:29.428pm [ 19:21:29.428 ]
hr_min_s7ImPlotTimeFmt_HrMinS7:21:29pm [ 19:21:29 ]
hr_min8ImPlotTimeFmt_HrMin7:21pm [ 19:21 ]
hr9ImPlotTimeFmt_Hr7pm [ 19:00 ]

MarkerInternal_ (enum)

MemberValueC++
im_plot_marker_invalid-3ImPlotMarker_Invalid = -3

Structs

DateTimeSpec (class)

Combined date/time format spec

AttributeC++
date: DateFmtImPlotDateFmt Date;
time: TimeFmtImPlotTimeFmt Time;
use_iso8601: boolbool UseISO8601;
use24_hour_clock: boolbool 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) -> None
ImPlotDateTimeSpec();
ImPlotDateTimeSpec(ImPlotDateFmt date_fmt, ImPlotTimeFmt time_fmt, bool use_24_hr_clk = false, bool use_iso_8601 = false);

Time (class)

Two part timestamp struct.

AttributeC++
s: time_ttime_t S;second part
us: intint Us;microsecond part
Time.__init__
@overload
def __init__(self) -> None

@overload
def __init__(self, s: time_t, us: int = 0) -> None
ImPlotTime();
ImPlotTime(time_t s, int us = 0);
Time.roll_over
def roll_over(self) -> None
void RollOver();

(private API)

Time.to_double
def to_double(self) -> float
double ToDouble() const;

(private API)

Time.from_double
@staticmethod
def from_double(t: float) -> Time
static ImPlotTime FromDouble(double t);

(private API)

ColormapData (class)

Colormap data storage

AttributeC++
keys: ImVector_ImU32ImVector<ImU32> Keys;
key_counts: ImVector_intImVector<int> KeyCounts;
key_offsets: ImVector_intImVector<int> KeyOffsets;
tables: ImVector_ImU32ImVector<ImU32> Tables;
table_sizes: ImVector_intImVector<int> TableSizes;
table_offsets: ImVector_intImVector<int> TableOffsets;
text: TextBufferImGuiTextBuffer Text;
text_offsets: ImVector_intImVector<int> TextOffsets;
map: StorageImGuiStorage Map;
count: intint Count;
ColormapData.__init__
def __init__(self) -> None
ImPlotColormapData();
ColormapData.append
def append(self, name: str, keys: ImU32, count: int, qual: bool) -> int
int Append(const char* name, const ImU32* keys, int count, bool qual);

(private API)

ColormapData.rebuild_tables
def rebuild_tables(self) -> None
void RebuildTables();

(private API)

ColormapData.is_qual
def is_qual(self, cmap: Colormap) -> bool
inline bool IsQual(ImPlotColormap cmap) const;

(private API)

ColormapData.get_name
def get_name(self, cmap: Colormap) -> str
inline const char* GetName(ImPlotColormap cmap) const;

(private API)

ColormapData.get_index
def get_index(self, name: str) -> Colormap
inline ImPlotColormap GetIndex(const char* name) const;

(private API)

ColormapData.get_keys
def get_keys(self, cmap: Colormap) -> ImU32
inline const ImU32* GetKeys(ImPlotColormap cmap) const;

(private API)

ColormapData.get_key_count
def get_key_count(self, cmap: Colormap) -> int
inline int GetKeyCount(ImPlotColormap cmap) const;

(private API)

ColormapData.get_key_color
def get_key_color(self, cmap: Colormap, idx: int) -> ImU32
inline ImU32 GetKeyColor(ImPlotColormap cmap, int idx) const;

(private API)

ColormapData.set_key_color
def set_key_color(self, cmap: Colormap, idx: int, value: ImU32) -> None
inline void SetKeyColor(ImPlotColormap cmap, int idx, ImU32 value);

(private API)

ColormapData.get_table
def get_table(self, cmap: Colormap) -> ImU32
inline const ImU32* GetTable(ImPlotColormap cmap) const;

(private API)

ColormapData.get_table_size
def get_table_size(self, cmap: Colormap) -> int
inline int GetTableSize(ImPlotColormap cmap) const;

(private API)

ColormapData.get_table_color
def get_table_color(self, cmap: Colormap, idx: int) -> ImU32
inline ImU32 GetTableColor(ImPlotColormap cmap, int idx) const;

(private API)

ColormapData.lerp_table
def lerp_table(self, cmap: Colormap, t: float) -> ImU32
inline ImU32 LerpTable(ImPlotColormap cmap, float t) const;

(private API)

PointError (class)

ImPlotPoint with positive/negative error values

AttributeC++
x: floatdouble X,
y: floatY,
neg: floatNeg,
pos: floatPos;
PointError.__init__
@overload
def __init__(self) -> None

@overload
def __init__(self, x: float, y: float, neg: float, pos: float) -> None
ImPlotPointError();
ImPlotPointError(double x, double y, double neg, double pos);

Annotation (class)

Interior plot label/annotation

AttributeC++
pos: ImVec2ImVec2 Pos;
offset: ImVec2ImVec2 Offset;
color_bg: ImU32ImU32 ColorBg;
color_fg: ImU32ImU32 ColorFg;
text_offset: intint TextOffset;
clamp: boolbool Clamp;
Annotation.__init__
def __init__(self) -> None
ImPlotAnnotation();

AnnotationCollection (class)

Collection of plot labels

AttributeC++
text_buffer: TextBufferImGuiTextBuffer TextBuffer;
size: intint Size;
AnnotationCollection.__init__
def __init__(self) -> None
ImPlotAnnotationCollection();
AnnotationCollection.append
def append(self, pos: ImVec2Like, off: ImVec2Like, bg: ImU32, fg: ImU32, clamp: bool, fmt: str) -> None
void 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) -> str
const char* GetText(int idx);

(private API)

AnnotationCollection.reset
def reset(self) -> None
void Reset();

(private API)

Tag (class)

AttributeC++
axis: ImAxisImAxis Axis;
value: floatdouble Value;
color_bg: ImU32ImU32 ColorBg;
color_fg: ImU32ImU32 ColorFg;
text_offset: intint TextOffset;
Tag.__init__
def __init__(self) -> None
ImPlotTag();

TagCollection (class)

AttributeC++
text_buffer: TextBufferImGuiTextBuffer TextBuffer;
size: intint Size;
TagCollection.__init__
def __init__(self) -> None
ImPlotTagCollection();
TagCollection.append
def append(self, axis: ImAxis, value: float, bg: ImU32, fg: ImU32, fmt: str) -> None
void Append(ImAxis axis, double value, ImU32 bg, ImU32 fg, const char* fmt, ...);

(private API)

TagCollection.get_text
def get_text(self, idx: int) -> str
const char* GetText(int idx);

(private API)

TagCollection.reset
def reset(self) -> None
void Reset();

(private API)

Tick (class)

Tick mark info

AttributeC++
plot_pos: floatdouble PlotPos;
pixel_pos: floatfloat PixelPos;
label_size: ImVec2ImVec2 LabelSize;
text_offset: intint TextOffset;
major: boolbool Major;
show_label: boolbool ShowLabel;
level: intint Level;
idx: intint Idx;
Tick.__init__
@overload
def __init__(self) -> None

@overload
def __init__(self, value: float, major: bool, level: int, show_label: bool) -> None
ImPlotTick();
ImPlotTick(double value, bool major, int level, bool show_label);

Ticker (class)

Collection of ticks

AttributeC++
text_buffer: TextBufferImGuiTextBuffer TextBuffer;
max_size: ImVec2ImVec2 MaxSize;
late_size: ImVec2ImVec2 LateSize;
levels: intint Levels;
Ticker.__init__
def __init__(self) -> None
ImPlotTicker();
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) -> Tick
ImPlotTick& 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) -> str
const char* GetText(int idx) const;
const char* GetText(const ImPlotTick& tick);

(private API)

Ticker.override_size_late
def override_size_late(self, size: ImVec2Like) -> None
void OverrideSizeLate(const ImVec2& size);

(private API)

Ticker.reset
def reset(self) -> None
void Reset();

(private API)

Ticker.tick_count
def tick_count(self) -> int
int TickCount() const;

(private API)

Axis (class)

Axis state information that must persist after EndPlot

AttributeC++
id_: IDImGuiID ID;
flags: AxisFlagsImPlotAxisFlags Flags;
previous_flags: AxisFlagsImPlotAxisFlags PreviousFlags;
range: RangeImPlotRange Range;
range_cond: CondImPlotCond RangeCond;
scale: ScaleImPlotScale Scale;
fit_extents: RangeImPlotRange FitExtents;
ortho_axis: AxisImPlotAxis* OrthoAxis;
constraint_range: RangeImPlotRange ConstraintRange;
constraint_zoom: RangeImPlotRange ConstraintZoom;
ticker: TickerImPlotTicker Ticker;
formatter_data: Anyvoid* FormatterData;
linked_min: floatdouble* LinkedMin;
linked_max: floatdouble* LinkedMax;
picker_level: intint PickerLevel;
picker_time_min: TimeImPlotTime PickerTimeMin,
picker_time_max: TimePickerTimeMax;
transform_data: Anyvoid* TransformData;
pixel_min: floatfloat PixelMin,
pixel_max: floatPixelMax;
scale_min: floatdouble ScaleMin,
scale_max: floatScaleMax;
scale_to_pixel: floatdouble ScaleToPixel;
datum1: floatfloat Datum1,
datum2: floatDatum2;
hover_rect: ImRectImRect HoverRect;
label_offset: intint LabelOffset;
color_maj: ImU32ImU32 ColorMaj,
color_min: ImU32ColorMin,
color_tick: ImU32ColorTick,
color_txt: ImU32ColorTxt,
color_bg: ImU32ColorBg,
color_hov: ImU32ColorHov,
color_act: ImU32ColorAct,
color_hi_li: ImU32ColorHiLi;
enabled: boolbool Enabled;
vertical: boolbool Vertical;
fit_this_frame: boolbool FitThisFrame;
has_range: boolbool HasRange;
has_format_spec: boolbool HasFormatSpec;
show_default_ticks: boolbool ShowDefaultTicks;
hovered: boolbool Hovered;
held: boolbool Held;
Axis.__init__
def __init__(self) -> None
ImPlotAxis();
Axis.reset
def reset(self) -> None
inline void Reset();

(private API)

Axis.set_min
def set_min(self, _min: float, force: bool = False) -> bool
inline bool SetMin(double _min, bool force=false);

(private API)

Axis.set_max
def set_max(self, _max: float, force: bool = False) -> bool
inline 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) -> None
inline 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) -> None
inline void SetAspect(double unit_per_pix);

(private API)

Axis.pixel_size
def pixel_size(self) -> float
inline float PixelSize() const;

(private API)

Axis.get_aspect
def get_aspect(self) -> float
inline double GetAspect() const;

(private API)

Axis.constrain
def constrain(self) -> None
inline void Constrain();

(private API)

Axis.update_transform_cache
def update_transform_cache(self) -> None
inline void UpdateTransformCache();

(private API)

Axis.plot_to_pixels
def plot_to_pixels(self, plt: float) -> float
inline float PlotToPixels(double plt) const;

(private API)

Axis.pixels_to_plot
def pixels_to_plot(self, pix: float) -> float
inline double PixelsToPlot(float pix) const;

(private API)

Axis.extend_fit
def extend_fit(self, v: float) -> None
inline void ExtendFit(double v);

(private API)

Axis.extend_fit_with
def extend_fit_with(self, alt: Axis, v: float, v_alt: float) -> None
inline void ExtendFitWith(ImPlotAxis& alt, double v, double v_alt);

(private API)

Axis.apply_fit
def apply_fit(self, padding: float) -> None
inline void ApplyFit(float padding);

(private API)

Axis.has_label
def has_label(self) -> bool
inline bool HasLabel() const;

(private API)

Axis.has_grid_lines
def has_grid_lines(self) -> bool
inline bool HasGridLines() const;

(private API)

Axis.has_tick_labels
def has_tick_labels(self) -> bool
inline bool HasTickLabels() const;

(private API)

Axis.has_tick_marks
def has_tick_marks(self) -> bool
inline bool HasTickMarks() const;

(private API)

Axis.will_render
def will_render(self) -> bool
inline bool WillRender() const;

(private API)

Axis.is_opposite
def is_opposite(self) -> bool
inline bool IsOpposite() const;

(private API)

Axis.is_inverted
def is_inverted(self) -> bool
inline bool IsInverted() const;

(private API)

Axis.is_foreground
def is_foreground(self) -> bool
inline bool IsForeground() const;

(private API)

Axis.is_auto_fitting
def is_auto_fitting(self) -> bool
inline bool IsAutoFitting() const;

(private API)

Axis.can_init_fit
def can_init_fit(self) -> bool
inline bool CanInitFit() const;

(private API)

Axis.is_range_locked
def is_range_locked(self) -> bool
inline bool IsRangeLocked() const;

(private API)

Axis.is_locked_min
def is_locked_min(self) -> bool
inline bool IsLockedMin() const;

(private API)

Axis.is_locked_max
def is_locked_max(self) -> bool
inline bool IsLockedMax() const;

(private API)

Axis.is_locked
def is_locked(self) -> bool
inline bool IsLocked() const;

(private API)

Axis.is_input_locked_min
def is_input_locked_min(self) -> bool
inline bool IsInputLockedMin() const;

(private API)

Axis.is_input_locked_max
def is_input_locked_max(self) -> bool
inline bool IsInputLockedMax() const;

(private API)

Axis.is_input_locked
def is_input_locked(self) -> bool
inline bool IsInputLocked() const;

(private API)

Axis.has_menus
def has_menus(self) -> bool
inline bool HasMenus() const;

(private API)

Axis.is_pan_locked
def is_pan_locked(self, increasing: bool) -> bool
inline bool IsPanLocked(bool increasing);

(private API)

def push_links(self) -> None
void PushLinks();

(private API)

def pull_links(self) -> None
void PullLinks();

(private API)

AlignmentData (class)

Align plots group data

AttributeC++
vertical: boolbool Vertical;
pad_a: floatfloat PadA;
pad_b: floatfloat PadB;
pad_a_max: floatfloat PadAMax;
pad_b_max: floatfloat PadBMax;
AlignmentData.__init__
def __init__(self) -> None
ImPlotAlignmentData();
AlignmentData.begin
def begin(self) -> None
void 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) -> None
void End();

(private API)

AlignmentData.reset
def reset(self) -> None
void Reset();

(private API)

Item (class)

State information for Plot items

AttributeC++
id_: IDImGuiID ID;
color: ImU32ImU32 Color;
marker: MarkerImPlotMarker Marker;
legend_hover_rect: ImRectImRect LegendHoverRect;
name_offset: intint NameOffset;
show: boolbool Show;
legend_hovered: boolbool LegendHovered;
seen_this_frame: boolbool SeenThisFrame;
Item.__init__
def __init__(self) -> None
ImPlotItem();

Legend (class)

Holds Legend state

AttributeC++
flags: LegendFlagsImPlotLegendFlags Flags;
previous_flags: LegendFlagsImPlotLegendFlags PreviousFlags;
location: LocationImPlotLocation Location;
previous_location: LocationImPlotLocation PreviousLocation;
scroll: ImVec2ImVec2 Scroll;
indices: ImVector_intImVector<int> Indices;
labels: TextBufferImGuiTextBuffer Labels;
rect: ImRectImRect Rect;
rect_clamped: ImRectImRect RectClamped;
hovered: boolbool Hovered;
held: boolbool Held;
can_go_inside: boolbool CanGoInside;
Legend.__init__
def __init__(self) -> None
ImPlotLegend();
Legend.reset
def reset(self) -> None
void Reset();

(private API)

ItemGroup (class)

Holds Items and Legend data

AttributeC++
id_: IDImGuiID ID;
legend: LegendImPlotLegend Legend;
colormap_idx: intint ColormapIdx;
marker_idx: MarkerImPlotMarker MarkerIdx;
ItemGroup.__init__
def __init__(self) -> None
ImPlotItemGroup();
ItemGroup.get_item_count
def get_item_count(self) -> int
int GetItemCount() const;

(private API)

ItemGroup.get_item_id
def get_item_id(self, label_id: str) -> ID
ImGuiID 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) -> Item
ImPlotItem* GetItem(ImGuiID id);
ImPlotItem* GetItem(const char* label_id);

(private API)

ItemGroup.get_or_add_item
def get_or_add_item(self, id_: ID) -> Item
ImPlotItem* GetOrAddItem(ImGuiID id);

(private API)

ItemGroup.get_item_by_index
def get_item_by_index(self, i: int) -> Item
ImPlotItem* GetItemByIndex(int i);

(private API)

ItemGroup.get_item_index
def get_item_index(self, item: Item) -> int
int GetItemIndex(ImPlotItem* item);

(private API)

ItemGroup.get_legend_count
def get_legend_count(self) -> int
int GetLegendCount() const;

(private API)

ItemGroup.get_legend_item
def get_legend_item(self, i: int) -> Item
ImPlotItem* GetLegendItem(int i);

(private API)

ItemGroup.get_legend_label
def get_legend_label(self, i: int) -> str
const char* GetLegendLabel(int i);

(private API)

ItemGroup.reset
def reset(self) -> None
void Reset();

(private API)

Plot (class)

Holds Plot state information that must persist after EndPlot

AttributeC++
id_: IDImGuiID ID;
flags: FlagsImPlotFlags Flags;
previous_flags: FlagsImPlotFlags PreviousFlags;
mouse_text_location: LocationImPlotLocation MouseTextLocation;
mouse_text_flags: MouseTextFlagsImPlotMouseTextFlags MouseTextFlags;
text_buffer: TextBufferImGuiTextBuffer TextBuffer;
items: ItemGroupImPlotItemGroup Items;
current_x: ImAxisImAxis CurrentX;
current_y: ImAxisImAxis CurrentY;
frame_rect: ImRectImRect FrameRect;
canvas_rect: ImRectImRect CanvasRect;
plot_rect: ImRectImRect PlotRect;
axes_rect: ImRectImRect AxesRect;
select_rect: ImRectImRect SelectRect;
select_start: ImVec2ImVec2 SelectStart;
title_offset: intint TitleOffset;
just_created: boolbool JustCreated;
initialized: boolbool Initialized;
setup_locked: boolbool SetupLocked;
fit_this_frame: boolbool FitThisFrame;
hovered: boolbool Hovered;
held: boolbool Held;
selecting: boolbool Selecting;
selected: boolbool Selected;
context_locked: boolbool ContextLocked;
Plot.__init__
def __init__(self) -> None
ImPlotPlot();
Plot.is_input_locked
def is_input_locked(self) -> bool
inline bool IsInputLocked() const;

(private API)

Plot.clear_text_buffer
def clear_text_buffer(self) -> None
inline void ClearTextBuffer();

(private API)

Plot.set_title
def set_title(self, title: str) -> None
inline void SetTitle(const char* title);

(private API)

Plot.has_title
def has_title(self) -> bool
inline bool HasTitle() const;

(private API)

Plot.get_title
def get_title(self) -> str
inline const char* GetTitle() const;

(private API)

Plot.x_axis
def x_axis(self, i: int) -> Axis
inline ImPlotAxis& XAxis(int i);

(private API)

Plot.y_axis
def y_axis(self, i: int) -> Axis
inline ImPlotAxis& YAxis(int i);

(private API)

Plot.enabled_axes_x
def enabled_axes_x(self) -> int
inline int EnabledAxesX();

(private API)

Plot.enabled_axes_y
def enabled_axes_y(self) -> int
inline int EnabledAxesY();

(private API)

Plot.set_axis_label
def set_axis_label(self, axis: Axis, label: str) -> None
inline void SetAxisLabel(ImPlotAxis& axis, const char* label);

(private API)

Plot.get_axis_label
def get_axis_label(self, axis: Axis) -> str
inline const char* GetAxisLabel(const ImPlotAxis& axis) const;

(private API)

Subplot (class)

Holds subplot data that must persist after EndSubplot

AttributeC++
id_: IDImGuiID ID;
flags: SubplotFlagsImPlotSubplotFlags Flags;
previous_flags: SubplotFlagsImPlotSubplotFlags PreviousFlags;
items: ItemGroupImPlotItemGroup Items;
rows: intint Rows;
cols: intint Cols;
current_idx: intint CurrentIdx;
frame_rect: ImRectImRect FrameRect;
grid_rect: ImRectImRect GridRect;
cell_size: ImVec2ImVec2 CellSize;
row_ratios: ImVector_floatImVector<float> RowRatios;
col_ratios: ImVector_floatImVector<float> ColRatios;
temp_sizes: np.ndarrayfloat TempSizes[2];ndarray[type=float, size=2]
frame_hovered: boolbool FrameHovered;
has_title: boolbool HasTitle;
Subplot.__init__
def __init__(self) -> None
ImPlotSubplot();

NextPlotData (class)

Temporary data storage for upcoming plot

NextPlotData.__init__
def __init__(self) -> None
ImPlotNextPlotData();
NextPlotData.reset
def reset(self) -> None
void Reset();

(private API)

NextItemData (class)

Temporary data storage for upcoming item

AttributeC++
spec: SpecImPlotSpec Spec;
render_line: boolbool RenderLine;
render_fill: boolbool RenderFill;
render_marker_line: boolbool RenderMarkerLine;
render_marker_fill: boolbool RenderMarkerFill;
render_markers: boolbool RenderMarkers;
has_hidden: boolbool HasHidden;
hidden: boolbool Hidden;
hidden_cond: CondImPlotCond HiddenCond;
NextItemData.__init__
def __init__(self) -> None
ImPlotNextItemData();
NextItemData.reset
def reset(self) -> None
void Reset();

(private API)

Context (class)

Holds state information that must persist between calls to BeginPlot()/EndPlot()

AttributeC++
current_plot: PlotImPlotPlot* CurrentPlot;
current_subplot: SubplotImPlotSubplot* CurrentSubplot;
current_items: ItemGroupImPlotItemGroup* CurrentItems;
current_item: ItemImPlotItem* CurrentItem;
previous_item: ItemImPlotItem* PreviousItem;
c_ticker: TickerImPlotTicker CTicker;
annotations: AnnotationCollectionImPlotAnnotationCollection Annotations;
tags: TagCollectionImPlotTagCollection Tags;
style: StyleImPlotStyle Style;
color_modifiers: ImVector_ColorModImVector<ImGuiColorMod> ColorModifiers;
style_modifiers: ImVector_StyleModImVector<ImGuiStyleMod> StyleModifiers;
colormap_data: ColormapDataImPlotColormapData ColormapData;
temp_int1: ImVector_intImVector<int> TempInt1;
digital_plot_item_cnt: intint DigitalPlotItemCnt;
digital_plot_offset: intint DigitalPlotOffset;
next_plot_data: NextPlotDataImPlotNextPlotData NextPlotData;
next_item_data: NextItemDataImPlotNextItemData NextItemData;
input_map: InputMapImPlotInputMap InputMap;
open_context_this_frame: boolbool OpenContextThisFrame;
mouse_pos_string_builder: TextBufferImGuiTextBuffer MousePosStringBuilder;
sort_items: ItemGroupImPlotItemGroup* SortItems;
current_alignment_h: AlignmentDataImPlotAlignmentData* CurrentAlignmentH;
current_alignment_v: AlignmentDataImPlotAlignmentData* CurrentAlignmentV;
can_drag_plot_in_node_editor: boolbool 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) -> None

Auto-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) -> None
IMPLOT_API void Initialize(ImPlotContext* ctx);

Initializes an ImPlotContext

reset_ctx_for_next_plot

def reset_ctx_for_next_plot(ctx: Context) -> None
IMPLOT_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) -> None
IMPLOT_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) -> None
IMPLOT_API void ResetCtxForNextSubplot(ImPlotContext* ctx);

Resets an ImPlot context for the next call to BeginSubplot

Plot Utils

get_plot

def get_plot(title: str) -> Plot
IMPLOT_API ImPlotPlot* GetPlot(const char* title);

Gets a plot from the current ImPlotContext

get_current_plot

def get_current_plot() -> Plot
IMPLOT_API ImPlotPlot* GetCurrentPlot();

Gets the current plot from the current ImPlotContext

bust_plot_cache

def bust_plot_cache() -> None
IMPLOT_API void BustPlotCache();

Busts the cache for every plot in the current context

show_plot_context_menu

def show_plot_context_menu(plot: Plot) -> None
IMPLOT_API void ShowPlotContextMenu(ImPlotPlot& plot);

Shows a plot’s context menu.

Setup Utils

setup_lock

def setup_lock() -> None
static inline void SetupLock();

Lock Setup and call SetupFinish if necessary. (private API)

Subplot Utils

subplot_next_cell

def subplot_next_cell() -> None
IMPLOT_API void SubplotNextCell();

Advances to next subplot

show_subplots_context_menu

def show_subplots_context_menu(subplot: Subplot) -> None
IMPLOT_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) -> bool
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.

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() -> None
IMPLOT_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) -> Item
IMPLOT_API ImPlotItem* GetItem(const char* label_id);

Get a plot item from the current plot.

get_current_item

def get_current_item() -> Item
IMPLOT_API ImPlotItem* GetCurrentItem();

Gets the current item.

bust_item_cache

def bust_item_cache() -> None
IMPLOT_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) -> bool
static 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) -> bool
static 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) -> bool
static inline bool AnyAxesHeld(ImPlotAxis* axes, int count);

(private API)

any_axes_hovered

def any_axes_hovered(axes: Axis, count: int) -> bool
static inline bool AnyAxesHovered(ImPlotAxis* axes, int count);

(private API)

fit_this_frame

def fit_this_frame() -> bool
static 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) -> None
static 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) -> None
static 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) -> None
static 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) -> bool
static 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) -> None
IMPLOT_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) -> ImVec2
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.

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) -> ImVec2
IMPLOT_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) -> bool
IMPLOT_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) -> bool
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

show_alt_legend

def show_alt_legend(title_id: str, vertical: bool = True, size: Optional[ImVec2Like] = None, interactable: bool = True) -> None
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!).

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) -> bool
IMPLOT_API bool ShowLegendContextMenu(ImPlotLegend& legend, bool visible);

Shows a legend’s context menu.

Styling Utils

get_item_data

def get_item_data() -> NextItemData
static 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) -> bool
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)

get_auto_color

def get_auto_color(idx: Col) -> ImVec4
IMPLOT_API ImVec4 GetAutoColor(ImPlotCol idx);

Returns the automatically deduced style color

get_style_color_vec4

def get_style_color_vec4(idx: Col) -> ImVec4
static 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) -> ImU32
static 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) -> None
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.

add_text_centered

def add_text_centered(draw_list: ImDrawList, top_center: ImVec2Like, col: ImU32, text_begin: str, text_end: Optional[str] = None) -> None
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.

calc_text_size_vertical

def calc_text_size_vertical(text: str) -> ImVec2
static 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) -> ImU32
static inline ImU32 CalcTextColor(const ImVec4& bg);
static inline ImU32 CalcTextColor(ImU32 bg);

(private API)

calc_hover_color

def calc_hover_color(col: ImU32) -> ImU32
static 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) -> ImVec2
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)

get_colormap_color_u32

def get_colormap_color_u32(idx: int, cmap: Colormap) -> ImU32
IMPLOT_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() -> ImU32
IMPLOT_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) -> ImU32
IMPLOT_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) -> None
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

nice_num

def nice_num(x: float, round: bool) -> float
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)

order_of_magnitude

def order_of_magnitude(val: float) -> int
static inline int OrderOfMagnitude(double val);

Computes order of magnitude of double. (private API)

order_to_precision

def order_to_precision(order: int) -> int
static inline int OrderToPrecision(int order);

Returns the precision required for a order of magnitude. (private API)

precision

def precision(val: float) -> int
static 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) -> float
static 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) -> ImVec2
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

is_leap_year

def is_leap_year(year: int) -> bool
static 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) -> int
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)

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) -> Time
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]

get_year

def get_year(t: Time) -> int
IMPLOT_API int GetYear(const ImPlotTime& t);

Get year component from timestamp [1970-3000]

get_month

def get_month(t: Time) -> int
IMPLOT_API int GetMonth(const ImPlotTime& t);

Get month component from timestamp [0-11]

add_time

def add_time(t: Time, unit: TimeUnit, count: int) -> Time
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.

floor_time

def floor_time(t: Time, unit: TimeUnit) -> Time
IMPLOT_API ImPlotTime FloorTime(const ImPlotTime& t, ImPlotTimeUnit unit);

Rounds a timestamp down to nearest unit.

ceil_time

def ceil_time(t: Time, unit: TimeUnit) -> Time
IMPLOT_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) -> Time
IMPLOT_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) -> Time
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.

now

def now() -> Time
static inline ImPlotTime Now();

Get the current time as a timestamp. (private API)

today

def today() -> Time
static 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) -> str
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

format_date_str

def format_date_str(t: Time, fmt: DateFmt, use_iso_8601: bool) -> str
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

format_date_time_str

def format_date_time_str(t: Time, fmt: DateTimeSpec) -> str
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

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) -> bool
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

transform_forward_log10

def transform_forward_log10(v: float, param_1: Any) -> float
static inline double TransformForward_Log10(double v, void*);

(private API)

transform_inverse_log10

def transform_inverse_log10(v: float, param_1: Any) -> float
static inline double TransformInverse_Log10(double v, void*);

(private API)

transform_forward_sym_log

def transform_forward_sym_log(v: float, param_1: Any) -> float
static inline double TransformForward_SymLog(double v, void*);

(private API)

transform_inverse_sym_log

def transform_inverse_sym_log(v: float, param_1: Any) -> float
static inline double TransformInverse_SymLog(double v, void*);

(private API)

transform_forward_logit

def transform_forward_logit(v: float, param_1: Any) -> float
static inline double TransformForward_Logit(double v, void*);

(private API)

transform_inverse_logit

def transform_inverse_logit(v: float, param_1: Any) -> float
static inline double TransformInverse_Logit(double v, void*);

(private API)

Formatter_Time_Data (class)

AttributeC++
time: TimeImPlotTime Time;
spec: DateTimeSpecImPlotDateTimeSpec Spec;
user_formatter_data: Anyvoid* UserFormatterData;
Formatter_Time_Data.__init__
def __init__(self, time: Optional[Time] = None, spec: Optional[DateTimeSpec] = None) -> None

Auto-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()