slimgui - ImPlot API reference

Overview

The Slimgui package provides modern Python bindings for the following libraries:

The Python bindings documentation has been split into several parts:

The project source code is hosted on github.com/nurpax/slimgui.

Module naming

The below reference assumes the Python bindings are imported as:

from slimgui import imgui
from slimgui import implot

For example, a symbol like slimgui_ext.imgui.MouseButton will be written as imgui.MouseButton.

Binding considerations for ImPlot

ImPlot Enums

A detailed enum and class reference can be found here: Enum Reference

ImPlot API functions

Contexts

def create_context() -> implot.WrappedContext

Create an ImPlot context. Call this after imgui.create_context().

def destroy_context(ctx: implot.WrappedContext | None

Destroys an ImPlot context. Call this before imgui.destroy_context(). None = destroy current context.

def get_current_context() -> implot.WrappedContext | None

Returns the current ImPlot context. None if no context has ben set.

def set_current_context(ctx: implot.WrappedContext) -> None

Sets the current ImPlot context.

Begin/End Plot

def begin_plot(title_id: str, size: tuple[float, float] = (-1,0), flags: PlotFlags = PlotFlags.NONE) -> bool

Starts a 2D plotting context. If this function returns True, implot.end_plot() MUST be called! You are encouraged to use the following convention:

if implot.begin_plot(...):
    implot.plot_line(...)
    ...
    implot.end_plot()

Important notes:

def end_plot() -> None

Only call implot.end_plot() if implot.begin_plot() returns True! Typically called at the end of an if statement conditioned on implot.begin_plot(). See example above.

Subplots

begin_subplots() starts a subdivided plotting context. If the function returns True, end_subplots() MUST be called! Call begin_plot()/end_plot() at most [rows*cols] times in between the begining and end of the subplot context. Plots are added in row major order (or use SubplotFlags.COL_MAJOR if you want column major).

Example:

if implot.begin_subplots("My Subplot", 2, 3, (800, 400)):
    for i in range(6):
        if implot.begin_plot(...):
            implot.plot_line(...)
            ...
            implot.end_plot()
    implot.end_subplots()

Produces:

  [0] | [1] | [2]
  ----|-----|----
  [3] | [4] | [5]

Important notes:

Important notes regarding begin_plot() from inside of begin_subplots():

def begin_subplots(title_id: str, rows: int, cols: int, size: tuple[float, float], flags: SubplotFlags = SubplotFlags.NONE, row_ratios: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C', device='cpu')] | None = None, col_ratios: Annotated[ArrayLike, dict(dtype='float32', shape=(None), order='C', device='cpu')] | None = None) -> bool

See https://nurpax.github.io/slimgui/apiref_implot.html#subplots for details.

def end_subplots() -> None

Setup

The following API allows you to set up and customize various aspects of the current plot. The functions should be called immediately after begin_plot() and before any other API calls. Typical usage is as follows:

if implot.begin_plot(...):                     # 1) begin a new plot
    implot.setup_axis(im_axis_x1, "My X-Axis") # 2) make setup calls
    implot.setup_axis(im_axis_y1, "My Y-Axis")
    implot.setup_legend(im_plot_location_north)
    ...
    implot.setup_finish()                      # 3) [optional] explicitly finish setup
    implot.plot_line(...)                      # 4) plot items
    ...
    implot.end_plot()                          # 5) end the plot

Important Notes:

def setup_axis(axis: Axis, label: str | None = None, flags: AxisFlags = AxisFlags.NONE) -> None

Enables an axis or sets the label and/or flags for an existing axis. Leave label=None for no label.

def setup_axis_limits(axis: Axis, v_min: float, v_max: float, cond: Cond = Cond.ONCE) -> None

Sets an axis range limits. If Cond.ALWAYS is used, the axes limits will be locked. Inversion with v_min > v_max is not supported; use implot.setup_axis_limits instead.

def setup_axis_format(axis: Axis, fmt: str) -> None

Sets the format of numeric axis labels via formater specifier (default="%g"). Formated values will be double (i.e. use %f). Note that the format string is specified in C printf syntax!

def setup_axis_ticks(axis: int, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], labels: Sequence[str] | None = None, keep_default: bool = False) -> None

Sets an axis' ticks and optionally the labels. To keep the default ticks, set keep_default=True.

def setup_axis_ticks(axis: int, v_min: float, v_max: float, n_ticks: int, labels: Sequence[str] | None = None, keep_default: bool = False) -> None
def setup_axis_scale(axis: Axis, scale: Scale) -> None

Sets an axis' scale using built-in options.

def setup_axis_limits_constraints(axis: Axis, v_min: float, v_max: float) -> None

Sets an axis' limits constraints.

def setup_axis_zoom_constraints(axis: Axis, z_min: float, z_max: float) -> None

Sets an axis' zoom constraints.

def setup_axes(x_label: str | None, y_label: str | None, x_flags: AxisFlags = AxisFlags.NONE, y_flags: AxisFlags = AxisFlags.NONE) -> None

Sets the label and/or flags for primary X and Y axes (shorthand for two calls to implot.setup_Axis()).

def setup_axes_limits(x_min: float, x_max: float, y_min: float, y_max: float, cond: Cond = Cond.ONCE) -> None

Sets the primary X and Y axes range limits. If Cond.ALWAYS is used, the axes limits will be locked (shorthand for two calls to implot.setup_axis_limits()).

def setup_legend(location: Location, flags: LegendFlags = LegendFlags.NONE) -> None

Sets up the plot legend. This can also be called immediately after implot.begin_subplots() when using SubplotFlags.SHARE_ITEMS.

def setup_mouse_text(location: Location, flags: MouseTextFlags = MouseTextFlags.NONE) -> None

Set the location of the current plot's mouse position text (default = South|East).

def setup_finish() -> None

Explicitly finalize plot setup. Once you call this, you cannot make anymore Setup calls for the current plot!

Note that calling this function is OPTIONAL; it will be called by the first subsequent setup-locking API call.

SetNext

Though you should default to the setup() API above, there are some scenarios where (re)configuring a plot or axis before begin_plot() is needed (e.g., if using a preceding button or slider widget to change the plot limits). In this case, you can use the set_next_*() API below. While this is not as feature-rich as the setup() API, most common needs are provided. These functions can be called anywhere except inside of begin_plot/end_plot. For example:

if imgui.button("Center Plot"):
    implot.set_next_axes_limits(-1, 1, -1, 1)
if implot.begin_plot(...):
    ...
    implot.end_plot()

Important Notes:

def set_next_axis_limits(axis: Axis, v_min: float, v_max: float, cond: Cond = Cond.ONCE) -> None

Sets an upcoming axis range limits. If ImPlotCond_Always is used, the axes limits will be locked.

def set_next_axis_to_fit(axis: Axis) -> None

Set an upcoming axis to auto fit to its data.

def set_next_axes_limits(x_min: float, x_max: float, y_min: float, y_max: float, cond: Cond = Cond.ONCE) -> None

Sets the upcoming primary X and Y axes range limits. If Cond.ALWAYS is used, the axes limits will be locked (shorthand for two calls to implot.setup_axis_limits()).

def set_next_axes_to_fit() -> None

Sets all upcoming axes to auto fit to their data.

Plot Items

The main plotting API is provied below. Call these functions between Begin/EndPlot and after any Setup API calls. Each plots data on the current x and y axes, which can be changed with set_axis()/set_axes().

NB: All types are converted to double before plotting. You may lose information if you try plotting extremely large 64-bit integral types. Proceed with caution!

def plot_line(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], xscale: float = 1.0, xstart: float = 0.0, flags: LineFlags = LineFlags.NONE) -> None

Plots a standard 2D line plot. The x values are spaced evenly along the x axis, starting at xstart and spaced by xscale. The y values are taken from the values array.

def plot_line(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: LineFlags = LineFlags.NONE) -> None

Plots a standard 2D line plot. The x values are taken from the xs array, and the y values are taken from the ys array.

def plot_scatter(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], xscale: float = 1.0, xstart: float = 0.0, flags: ScatterFlags = ScatterFlags.NONE) -> None

Plots a standard 2D scatter plot. Default marker is Marker.CIRCLE.

def plot_scatter(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: ScatterFlags = ScatterFlags.NONE) -> None
def plot_stairs(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], xscale: float = 1.0, xstart: float = 0.0, flags: StairsFlags = StairsFlags.NONE) -> None

Plots a stairstep graph. The y value is continued constantly to the right from every x position, i.e. the interval [x[i], x[i+1]) has the value y[i]

def plot_stairs(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: StairsFlags = StairsFlags.NONE) -> None
def plot_shaded(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], yref: float = 0, xscale: float = 1.0, xstart: float = 0.0, flags: ShadedFlags = ShadedFlags.NONE) -> None

Plots a shaded (filled) region between two lines, or a line and a horizontal reference. Set yref to +/-INFINITY for infinite fill extents.

def plot_shaded(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], yref: float = 0, flags: ShadedFlags = ShadedFlags.NONE) -> None
def plot_shaded(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys1: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys2: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: ShadedFlags = ShadedFlags.NONE) -> None
def plot_bars(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], bar_size: float = 0.67, shift: float = 0.0, flags: BarsFlags = BarsFlags.NONE) -> None

Plots a bar graph. Vertical by default. bar_size and shift are in plot units.

def plot_bars(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], bar_size: float, flags: BarsFlags = BarsFlags.NONE) -> None
def plot_bar_groups(label_ids: Sequence[str], values: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), order='C', device='cpu', writable=False)], group_size: float = 0.67, shift: float = 0.0, flags: BarGroupsFlags = BarGroupsFlags.NONE) -> None

Plots a group of bars. values is a matrix with a shape (item_count, group_count). label_ids should have item_count elements.

def plot_error_bars(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], err: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: ErrorBarsFlags = ErrorBarsFlags.NONE) -> None

Plots vertical error bar. The label_id should be the same as the label_id of the associated line or bar plot.

def plot_error_bars(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], neg: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], pos: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: ErrorBarsFlags = ErrorBarsFlags.NONE) -> None
def plot_heatmap(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None, None), order='C', device='cpu', writable=False)], scale_min: float = 0, scale_max: float = 0.0, label_fmt: str | None = '%.1f', bounds_min: tuple[float, float] = (0.0, 0.0), bounds_max: tuple[float, float] = (1.0, 1.0), flags: HeatmapFlags = HeatmapFlags.NONE) -> None

Plots a 2D heatmap chart. values is expected to have shape (rows, cols). Leave scale_min and scale_max both at 0 for automatic color scaling, or set them to a predefined range. label_fmt can be set to None for no labels.

def plot_digital(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], flags: DigitalFlags = DigitalFlags.NONE) -> None

Plots digital data. Digital plots do not respond to y drag or zoom, and are always referenced to the bottom of the plot.

def plot_image(label_id: str, user_texture_id: int, bounds_min: tuple[float, float], bounds_max: tuple[float, float], uv0: tuple[float, float] = (0,0), uv1: tuple[float, float] = (1,1), tint_col: tuple[float, float, float, float] = (1,1,1,1), flags: ImageFlag = ImageFlag.NONE) -> None

Plots an axis-aligned image. bounds_min/bounds_max are in plot coordinates (y-up) and uv0/uv1 are in texture coordinates (y-down).

def plot_text(text: str, x: float, y: float, pix_offset: tuple[float, float] = (0,0), flags: TextFlag = TextFlag.NONE) -> None

Plots a centered text label at point x,y with an optional pixel offset. Text color can be changed with implot.push_style_color(Col.INLAY_TEXT, ...).

def plot_dummy(label_id: str, flags: DummyFlag = DummyFlag.NONE) -> None

Plots a dummy item (i.e. adds a legend entry colored by Col.LINE).

def plot_histogram(label_id: str, values: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], bins: int | Bin = Bin.STURGES, bar_scale: float = 1.0, range: tuple[float, float] | None = None, flags: HistogramFlags = HistogramFlags.NONE) -> float

Plots a horizontal histogram. bins can be a positive integer or a method specified with the implot.Bin enum. If range is left unspecified, the min/max of values will be used as the range. Otherwise, outlier values outside of the range are not binned. The largest bin count or density is returned.

def plot_histogram2d(label_id: str, xs: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], ys: Annotated[ArrayLike, dict(dtype='float64', shape=(None), order='C', device='cpu', writable=False)], x_bins: int | Bin = Bin.STURGES, y_bins: int | Bin = Bin.STURGES, range: tuple[tuple[float, float], tuple[float, float]] | None = None, flags: HistogramFlags = HistogramFlags.NONE) -> float

Plots two dimensional, bivariate histogram as a heatmap. x_bins and y_bins can be a positive integer or a method specified with the implot.Bin enum. If range is left unspecified, the min/max of xs an ys will be used as the ranges. Otherwise, outlier values outside of range are not binned. The largest bin count or density is returned.

The range parameter in plot_histogram2d is typed as a pair of float 2-tuples. The first element is the range (min,max) for xs, the second for ys.

Plot Tools

The following can be used to render interactive elements and/or annotations. Like the item plotting functions above, they apply to the current x and y axes, which can be changed with set_axis()/set_axes(). These functions return True when user interaction causes the provided coordinates to change. Additional user interactions can be retrieved through the optional output parameters.

Functions such as drag_point, drag_line_x/y and drag_rect use np.arrays to pass in a mutable reference to float and bool values.

Be careful to use the right dtype for the input np.arrays: use dtype=np.float64 for floats and dtype=np.bool_ for bools. For example, to specify a point for drag_point, you could create the array like so: np.array([x, y], dtype=np.float64). Search for drag_line_x in example/implot_demo_window/implot.py for more examples.

def drag_point(id: int, point: Annotated[ArrayLike, dict(dtype='float64', shape=(2), order='C', device='cpu')], col: tuple[float, float, float, float], size: float = 4.0, flags: DragToolFlags = DragToolFlags.NONE, out_clicked: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_hovered: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_held: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None) -> bool

Shows a draggable point at point. The updated drag position will be written to the point array. Color col defaults to imgui.Col.TEXT. out_clicked, out_hovered, and out_held are optional single bool np.arrays that will be set to True if the point is clicked, hovered, or held, respectively. Returns True if the point was dragged.

The input np.array arguments are motivated by being able to pass in a mutable reference value that the bound API functions can write to. See https://nurpax.github.io/slimgui/apiref_implot.html#plot-tools for details.

def drag_line_x(id: int, x: Annotated[ArrayLike, dict(dtype='float64', shape=(), order='C', device='cpu')], col: tuple[float, float, float, float], thickness: float = 1, flags: DragToolFlags = DragToolFlags.NONE, out_clicked: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_hovered: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_held: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None) -> bool

Shows a draggable vertical guide line at an x-value. The updated drag position will be written to the x array. Color col defaults to imgui.Col.TEXT. out_clicked, out_hovered, and out_held are optional single bool np.arrays that will be set to True if the point is clicked, hovered, or held, respectively. Returns True if the line was dragged.

The input np.array arguments are motivated by being able to pass in a mutable reference value that the bound API functions can write to. See https://nurpax.github.io/slimgui/apiref_implot.html#plot-tools for details.

def drag_line_y(id: int, y: Annotated[ArrayLike, dict(dtype='float64', shape=(), order='C', device='cpu')], col: tuple[float, float, float, float], thickness: float = 1, flags: DragToolFlags = DragToolFlags.NONE, out_clicked: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_hovered: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_held: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None) -> bool

Shows a draggable horizontal guide line at a y-value. The updated drag position will be written to the y array. Color col defaults to imgui.Col.TEXT. out_clicked, out_hovered, and out_held are optional single bool np.arrays that will be set to True if the line is clicked, hovered, or held, respectively. Returns True if the line was dragged.

The input np.array arguments are motivated by being able to pass in a mutable reference value that the bound API functions can write to. See https://nurpax.github.io/slimgui/apiref_implot.html#plot-tools for details.

def drag_rect(id: int, rect: Annotated[ArrayLike, dict(dtype='float64', shape=(2, 2), order='C', device='cpu')], col: tuple[float, float, float, float], flags: DragToolFlags = DragToolFlags.NONE, out_clicked: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_hovered: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None, out_held: Annotated[ArrayLike, dict(dtype='bool', shape=(), order='C', device='cpu')] | None = None) -> bool

Shows a draggable rectangle at [[x0, y0], [x1, y1] coordinates, loaded from rect. The updated drag rectangle will be written to the point array. Color col defaults to imgui.Col.TEXT. out_clicked, out_hovered, and out_held are optional single bool np.arrays that will be set to True if the point is clicked, hovered, or held, respectively. Returns True if the rectangle was dragged.

The input np.array arguments are motivated by being able to pass in a mutable reference value that the bound API functions can write to. See https://nurpax.github.io/slimgui/apiref_implot.html#plot-tools for details.

def annotation(x: float, y: float, col: tuple[float, float, float, float], pix_offset: tuple[float, float], clamp: bool, round: bool = False) -> None

Shows an annotation callout at a chosen point. Clamping keeps annotations in the plot area. Annotations are always rendered on top.

def annotation(x: float, y: float, col: tuple[float, float, float, float], pix_offset: tuple[float, float], clamp: bool, text: str) -> None
def tag_x(x: float, col: tuple[float, float, float, float], round: bool = False) -> None

Shows a x-axis tag at the specified coordinate value.

def tag_x(x: float, col: tuple[float, float, float, float], text: str) -> None
def tag_y(y: float, col: tuple[float, float, float, float], round: bool = False) -> None

Shows a y-axis tag at the specified coordinate value.

def tag_y(y: float, col: tuple[float, float, float, float], text: str) -> None

Plot Utils

def set_axis(axis: Axis) -> None

Select which axis/axes will be used for subsequent plot elements.

def set_axes(x_axis: Axis, y_axis: Axis) -> None

Select which axis/axes will be used for subsequent plot elements.

def pixels_to_plot(pix: tuple[float, float], x_axis: Axis | int = AUTO, y_axis: Axis | int = AUTO) -> tuple[float, float]

Convert pixels to a position in the current plot's coordinate system. Passing implot.AUTO uses the current axes.

def pixels_to_plot(x: float, y: float, x_axis: Axis | int = AUTO, y_axis: Axis | int = AUTO) -> tuple[float, float]
def plot_to_pixels(plt: tuple[float, float], x_axis: Axis | int = AUTO, y_axis: Axis | int = AUTO) -> tuple[float, float]

Convert a position in the current plot's coordinate system to pixels. Passing implot.AUTO uses the current axes.

def plot_to_pixels(x: float, y: float, x_axis: Axis | int = AUTO, y_axis: Axis | int = AUTO) -> tuple[float, float]
def get_plot_pos() -> tuple[float, float]

Get the current Plot position (top-left) in pixels.

def get_plot_size() -> tuple[float, float]

Get the curent Plot size in pixels.

def get_plot_mouse_pos(x_axis: Axis | int = AUTO, y_axis: Axis | int = AUTO) -> tuple[float, float]

Returns the mouse position in x,y coordinates of the current plot. Passing implot.AUTO uses the current axes.

def is_plot_hovered() -> bool

Returns True if the plot area in the current plot is hovered.

def is_axis_hovered(axis: Axis) -> bool

Returns True if the axis label area in the current plot is hovered.

def is_subplots_hovered() -> bool

Returns True if the bounding frame of a subplot is hovered.

def is_plot_selected() -> bool

Returns True if the current plot is being box selected.

def cancel_plot_selection() -> None

Cancels a the current plot box selection.

def hide_next_item(hidden: bool = True, cond: Cond = Cond.ONCE) -> None

Hides or shows the next plot item (i.e. as if it were toggled from the legend).

Use Cond.ALWAYS if you need to forcefully set this every frame.

Use the following around calls to begin_plot()/end_plot() to align l/r/t/b padding. Consider using begin_subplots()/end_subplots() first. They are more feature rich and accomplish the same behaviour by default. The functions below offer lower level control of plot alignment.

def begin_aligned_plots(group_id: str, vertical: bool = True) -> bool

Align axis padding over multiple plots in a single row or column. group_id must be unique. If this function returns True, implot.end_aligned_plots() must be called.

def end_aligned_plots() -> None

Only call implot.end_aligned_plots() if implot.begin_aligned_plots() returns True!

Legend Utils

def begin_legend_popup(label_id: str, mouse_button: imgui.MouseButton = imgui.MouseButton.RIGHT) -> bool

Begin a popup for a legend entry.

def end_legend_popup() -> None

End a popup for a legend entry.

def is_legend_entry_hovered(label_id: str) -> bool

Returns True if a plot item legend entry is hovered.

Drag and Drop

def begin_drag_drop_target_plot() -> bool

Turns the current plot's plotting area into a drag and drop target. Don't forget to call implot.end_drag_drop_target()!

def begin_drag_drop_target_axis(axis: Axis) -> bool

Turns the current plot's X-axis into a drag and drop target. Don't forget to call implot.end_drag_drop_target()!

def begin_drag_drop_target_legend() -> bool

Turns the current plot's legend into a drag and drop target. Don't forget to call implot.end_drag_drop_target()!

def end_drag_drop_target() -> None

Ends a drag and drop target (currently just an alias for imgui.end_drag_drop_target()).

NB: By default, plot and axes drag and drop sources require holding the Ctrl modifier to initiate the drag. You can change the modifier if desired. If imgui.Key.MOD_NONE is provided, the axes will be locked from panning.

def begin_drag_drop_source_plot(flags: imgui.DragDropFlags = imgui.DragDropFlags.NONE) -> bool

Turns the current plot's plotting area into a drag and drop source. You must hold Ctrl. Don't forget to call implot.end_drag_drop_source()!

def begin_drag_drop_source_axis(axis: Axis, flags: imgui.DragDropFlags = imgui.DragDropFlags.NONE) -> bool

Turns the current plot's X-axis into a drag and drop source. You must hold Ctrl. Don't forget to call implot.end_drag_drop_source()!

def begin_drag_drop_source_item(label_id: str, flags: imgui.DragDropFlags = imgui.DragDropFlags.NONE) -> bool

Turns an item in the current plot's legend into drag and drop source. Don't forget to call implot.end_drag_drop_source()!

def end_drag_drop_source() -> None

Ends a drag and drop source (currently just an alias for imgui.end_drag_drop_source()).

Styling

Styling colors in ImPlot works similarly to styling colors in ImGui, but with one important difference. Like ImGui, all style colors are stored in an indexable array in ImPlotStyle. You can permanently modify these values through GetStyle().Colors, or temporarily modify them with Push/Pop functions below. However, by default all style colors in ImPlot default to a special color IMPLOT_AUTO_COL. The behavior of this color depends upon the style color to which it as applied:

  1. For style colors associated with plot items (e.g. Col.LINE), implot.AUTO_COL tells ImPlot to color the item with the next unused color in the current colormap. Thus, every item will have a different color up to the number of colors in the colormap, at which point the colormap will roll over. For most use cases, you should not need to set these style colors to anything but implot.AUTO_COL; you are probably better off changing the current colormap. However, if you need to explicitly color a particular item you may either Push/Pop the style color around the item in question, or use the set_next_*_style() API below. If you permanently set one of these style colors to a specific color, or forget to call Pop, then all subsequent items will be styled with the color you set.

  2. For style colors associated with plot styling (e.g. Col.PLOT_BG), implot.AUTO_COL tells ImPlot to set that color from color data in your imgui.Style. The imgui.Col that these style colors default to are detailed above, and in general have been mapped to produce plots visually consistent with your current ImGui style. Of course, you are free to manually set these colors to whatever you like, and further can Push/Pop them around individual plots for plot-specific styling (e.g. coloring axes).

def get_style() -> implot.Style

Provides access to plot style structure for permanant modifications to colors, sizes, etc.

def style_colors_auto(dst: Style | None = None) -> None

Style plot colors for current ImGui style (default).

def style_colors_classic(dst: Style | None = None) -> None

Style plot colors for ImGui "Classic".

def style_colors_dark(dst: Style | None = None) -> None

Style plot colors for ImGui "Dark".

def style_colors_light(dst: Style | None = None) -> None

Style plot colors for ImGui "Light".

Use push_style_* to temporarily modify your implot.Style. The modification will last until the matching call to pop_style_*. You MUST call a pop for every push, otherwise you will leak memory! This behaves just like ImGui.

def push_style_color(idx: Col, col: int) -> None

Temporarily modify a style color. Don't forget to call implot.pop_style_color()!

def push_style_color(idx: Col, col: tuple[float, float, float, float]) -> None
def pop_style_color(count: int = 1) -> None

Undo temporary style color modification(s). Undo multiple pushes at once by increasing count.

def push_style_var(idx: StyleVar, val: int) -> None

Temporarily modify a style variable of int type. Don't forget to call implot.pop_style_var()!

def push_style_var(idx: StyleVar, val: float) -> None

Temporarily modify a style variable of float type. Don't forget to call implot.pop_style_var()!

def push_style_var(idx: StyleVar, val: tuple[float, float]) -> None

Temporarily modify a style variable of float 2-tuple. Don't forget to call implot.pop_style_var()!

def pop_style_var(count: int = 1) -> None

Undo temporary style variable modification(s). Undo multiple pushes at once by increasing count.

The following can be used to modify the style of the next plot item ONLY. They do NOT require calls to pop_style_*. Leave style attributes you don't want modified to implot.AUTO or implot.AUTO_COL. Automatic styles will be deduced from the current values in your implot.Style or from Colormap data.

def set_next_line_style(col: tuple[float, float, float, float] = AUTO_COL, weight: float = AUTO) -> None

Set the line color and weight for the next item only.

def set_next_fill_style(col: tuple[float, float, float, float] = AUTO_COL, alpha_mod: float = AUTO) -> None

Set the fill color for the next item only.

def set_next_marker_style(marker: Marker | int = AUTO, size: float = AUTO, fill: tuple[float, float, float, float] = AUTO_COL, weight: float = AUTO, outline: tuple[float, float, float, float] = AUTO_COL) -> None

Set the marker style for the next item only.

def set_next_error_bar_style(col: tuple[float, float, float, float] = AUTO_COL, size: float = AUTO, weight: float = AUTO) -> None

Set the error bar style for the next item only.

def get_last_item_color() -> tuple[float, float, float, float]

Gets the last item primary color (i.e. its legend icon color)

def get_style_color_name(idx: Col) -> str

Returns the string name for an implot.Col.

def get_marker_name(idx: Marker) -> str

Returns the string name for an ImPlotMarker.

Colormaps

Item styling is based on colormaps when the relevant implot.Col.* is set to implot.AUTO_COL (default). Several built-in colormaps are available. You can add and then push/pop your own colormaps as well. To permanently set a colormap, modify the Colormap index member of your implot.Style.

Colormap data will be ignored and a custom color will be used if you have done one of the following:

  1. Modified an item style color in your implot.Style to anything other than implot.AUTO_COL.
  2. Pushed an item style color using push_style_color().
  3. Set the next item style with a set_next_*_style() function.
def get_colormap_count() -> int

Returns the number of available colormaps (i.e. the built-in + user-added count).

def get_colormap_name(cmap: Colormap) -> str

Returns a string name for a colormap given an index. Returns None if index is invalid.

def get_colormap_index(name: str) -> int

Returns an index number for a colormap given a valid string name. Returns -1 if name is invalid.

def push_colormap(cmap: Colormap) -> None

Temporarily switch to one of the built-in (i.e. ImPlotColormap_XXX) or user-added colormaps (i.e. a return value of implot.add_colormap()). Don't forget to call implot.pop_colormap()!

def push_colormap(name: str) -> None

Push a colormap by string name. Use built-in names such as "Default", "Deep", "Jet", etc. or a string you provided to implot.add_colormap(). Don't forget to callimplot.pop_colormap()`!

def pop_colormap(count: int = 1) -> None

Undo temporary colormap modification(s). Undo multiple pushes at once by increasing count.

def next_colormap_color() -> tuple[float, float, float, float]

Returns the next color from the current colormap and advances the colormap for the current plot.

Can also be used with no return value to skip colors if desired. You need to call this between implot.begin_plot()/implot.end_plot()!

Colormap utils. If cmap = implot.AUTO_COL (default), the current colormap is assumed. Pass an explicit colormap index (built-in or user-added) to specify otherwise.

def get_colormap_size(cmap: Colormap | int = AUTO) -> int

Returns the size of a colormap.

def get_colormap_color(idx: int, cmap: Colormap | int = AUTO) -> tuple[float, float, float, float]

Returns a color from a colormap given an index >= 0 (modulo will be performed).

def sample_colormap(t: float, cmap: Colormap | int = AUTO) -> tuple[float, float, float, float]

Sample a color from the current colormap given t between 0 and 1.

def colormap_scale(label: str, scale_min: float, scale_max: float, size: tuple[float, float] = (0,0), format: str = '%g', flags: ColormapScaleFlags = ColormapScaleFlags.NONE, cmap: Colormap | int = AUTO) -> None

Shows a vertical color scale with linear spaced ticks using the specified color map. Use double hashes to hide label (e.g. "##NoLabel"). If scale_min > scale_max, the scale to color mapping will be reversed.

def colormap_button(label: str, size: tuple[float, float] = (0,0), cmap: Colormap | int = AUTO) -> bool

Shows a button with a colormap gradient brackground.

def bust_color_cache(plot_title_id: str | None = None) -> None

When items in a plot sample their color from a colormap, the color is cached and does not change unless explicitly overriden. Therefore, if you change the colormap after the item has already been plotted, item colors will NOT update. If you need item colors to resample the new colormap, then use this function to bust the cached colors. If #plot_title_id is nullptr, then every item in EVERY existing plot will be cache busted. Otherwise only the plot specified by #plot_title_id will be busted. For the latter, this function must be called in the same ImGui ID scope that the plot is in. You should rarely if ever need this function, but it is available for applications that require runtime colormap swaps (e.g. Heatmaps demo).

Input Mapping

def get_input_map() -> implot.InputMap

Provides access to input mapping structure for permanant modifications to controls for pan, select, etc.

def map_input_default(dst: InputMap | None = None) -> None

Default input mapping: pan = LMB drag, box select = RMB drag, fit = LMB double click, context menu = RMB click, zoom = scroll.

def map_input_reverse(dst: InputMap | None = None) -> None

Reverse input mapping: pan = RMB drag, box select = LMB drag, fit = LMB double click, context menu = RMB click, zoom = scroll.

Miscellaneous

def item_icon(col: tuple[float, float, float, float]) -> None

Render icons similar to those that appear in legends (nifty for data lists).

def item_icon(col: int) -> None
def colormap_icon(cmap: Colormap) -> None

Render icons similar to those that appear in legends (nifty for data lists).

def get_plot_draw_list() -> imgui.DrawList

Get the plot draw list for custom rendering to the current plot area. Call between Begin/EndPlot.

def push_plot_clip_rect(expand: float = 0) -> None

Push clip rect for rendering to current plot area. The rect can be expanded or contracted by #expand pixels. Call between implot.begin_plot()/implot.end_plot().

def pop_plot_clip_rect() -> None

Pop plot clip rect. Call between implot.begin_plot()/implot.end_plot().

def show_style_selector(label: str) -> bool

Shows ImPlot style selector dropdown menu.

def show_colormap_selector(label: str) -> bool

Shows ImPlot colormap selector dropdown menu.

def show_input_map_selector(label: str) -> bool

Shows ImPlot input map selector dropdown menu.

def show_style_editor(ref: Style | None = None) -> None

Shows ImPlot style editor block (not a window).

def show_user_guide() -> None

Add basic help/info block for end users (not a window).

def show_metrics_window(closable: bool = False) -> bool

Shows ImPlot metrics/debug information window.

Demo

def show_demo_window(closable: bool = False) -> bool

Shows the ImPlot demo window.

Enum Reference

Axis (enum)
X1Enabled by default
X2Disabled by default
X3Disabled by default
Y1Enabled by default
Y2Disabled by default
Y3Disabled by default
COUNT
Bin (enum)
SQRTK = sqrt(n)
STURGESK = 1 + log2(n)
RICEK = 2 * cbrt(n)
SCOTTW = 3.49 * sigma / cbrt(n)
Col (enum)
LINEPlot line/outline color (defaults to next unused color in current colormap)
FILLPlot fill color for bars (defaults to the current line color)
MARKER_OUTLINEMarker outline color (defaults to the current line color)
MARKER_FILLMarker fill color (defaults to the current line color)
ERROR_BARError bar color (defaults to Col.TEXT)
FRAME_BGPlot frame background color (defaults to Col.FRAME_BG)
PLOT_BGPlot area background color (defaults to Col.WINDOW_BG)
PLOT_BORDERPlot area border color (defaults to Col.BORDER)
LEGEND_BGLegend background color (defaults to Col.POPUP_BG)
LEGEND_BORDERLegend border color (defaults to Col.PLOT_BORDER)
LEGEND_TEXTLegend text color (defaults to Col.INLAY_TEXT)
TITLE_TEXTPlot title text color (defaults to Col.TEXT)
INLAY_TEXTColor of text appearing inside of plots (defaults to Col.TEXT)
AXIS_TEXTAxis label and tick lables color (defaults to Col.TEXT)
AXIS_GRIDAxis grid color (defaults to 25% Col.AXIS_TEXT)
AXIS_TICKAxis tick color (defaults to AxisGrid)
AXIS_BGBackground color of axis hover region (defaults to transparent)
AXIS_BG_HOVEREDAxis hover color (defaults to Col.BUTTON_HOVERED)
AXIS_BG_ACTIVEAxis active color (defaults to Col.BUTTON_ACTIVE)
SELECTIONBox-selection color (defaults to yellow)
CROSSHAIRSCrosshairs color (defaults to Col.PLOT_BORDER)
COUNT
Colormap (enum)
DEEPA.k.a. seaborn deep (qual=true, n=10) (default)
DARKA.k.a. matplotlib "Set1" (qual=true, n=9 )
PASTELA.k.a. matplotlib "Pastel1" (qual=true, n=9 )
PAIREDA.k.a. matplotlib "Paired" (qual=true, n=12)
VIRIDISA.k.a. matplotlib "viridis" (qual=false, n=11)
PLASMAA.k.a. matplotlib "plasma" (qual=false, n=11)
HOTA.k.a. matplotlib/MATLAB "hot" (qual=false, n=11)
COOLA.k.a. matplotlib/MATLAB "cool" (qual=false, n=11)
PINKA.k.a. matplotlib/MATLAB "pink" (qual=false, n=11)
JETA.k.a. MATLAB "jet" (qual=false, n=11)
TWILIGHTA.k.a. matplotlib "twilight" (qual=false, n=11)
RD_BURed/blue, Color Brewer (qual=false, n=11)
BR_BGBrown/blue-green, Color Brewer (qual=false, n=11)
PI_YGPink/yellow-green, Color Brewer (qual=false, n=11)
SPECTRALColor spectrum, Color Brewer (qual=false, n=11)
GREYSWhite/black (qual=false, n=2 )
Cond (enum)
NONENo condition (always set the variable), same as _Always
ALWAYSNo condition (always set the variable)
ONCESet the variable once per runtime session (only the first call will succeed)
Location (enum)
CENTERCenter-center
NORTHTop-center
SOUTHBottom-center
WESTCenter-left
EASTCenter-right
NORTH_WESTTop-left
NORTH_EASTTop-right
SOUTH_WESTBottom-left
SOUTH_EASTBottom-right
Marker (enum)
NONENo marker
CIRCLEA circle marker (default)
SQUAREA square maker
DIAMONDA diamond marker
UPAn upward-pointing triangle marker
DOWNAn downward-pointing triangle marker
LEFTAn leftward-pointing triangle marker
RIGHTAn rightward-pointing triangle marker
CROSSA cross marker (not fillable)
PLUSA plus marker (not fillable)
ASTERISKA asterisk marker (not fillable)
COUNT
Scale (enum)
LINEARDefault linear scale
TIMEDate/time scale
LOG10Base 10 logartithmic scale
SYM_LOGSymmetric log scale
StyleVar (enum)
LINE_WEIGHTFloat, plot item line weight in pixels
MARKERInt, marker specification
MARKER_SIZEFloat, marker size in pixels (roughly the marker's "radius")
MARKER_WEIGHTFloat, plot outline weight of markers in pixels
FILL_ALPHAFloat, alpha modifier applied to all plot item fills
ERROR_BAR_SIZEFloat, error bar whisker width in pixels
ERROR_BAR_WEIGHTFloat, error bar whisker weight in pixels
DIGITAL_BIT_HEIGHTFloat, digital channels bit height (at 1) in pixels
DIGITAL_BIT_GAPFloat, digital channels bit padding gap in pixels
PLOT_BORDER_SIZEFloat, thickness of border around plot area
MINOR_ALPHAFloat, alpha multiplier applied to minor axis grid lines
MAJOR_TICK_LENImVec2, major tick lengths for X and Y axes
MINOR_TICK_LENImVec2, minor tick lengths for X and Y axes
MAJOR_TICK_SIZEImVec2, line thickness of major ticks
MINOR_TICK_SIZEImVec2, line thickness of minor ticks
MAJOR_GRID_SIZEImVec2, line thickness of major grid lines
MINOR_GRID_SIZEImVec2, line thickness of minor grid lines
PLOT_PADDINGImVec2, padding between widget frame and plot area, labels, or outside legends (i.e. main padding)
LABEL_PADDINGImVec2, padding between axes labels, tick labels, and plot edge
LEGEND_PADDINGImVec2, legend padding from plot edges
LEGEND_INNER_PADDINGImVec2, legend inner padding from legend edges
LEGEND_SPACINGImVec2, spacing between legend entries
MOUSE_POS_PADDINGImVec2, padding between plot edge and interior info text
ANNOTATION_PADDINGImVec2, text padding around annotation labels
FIT_PADDINGImVec2, additional fit padding as a percentage of the fit extents (e.g. ImVec2(0.1f,0.1f) adds 10% to the fit extents of X and Y)
PLOT_DEFAULT_SIZEImVec2, default size used when ImVec2(0,0) is passed to BeginPlot
PLOT_MIN_SIZEImVec2, minimum size plot frame can be when shrunk
COUNT
AxisFlags (enum)
NONEDefault
NO_LABELThe axis label will not be displayed (axis labels are also hidden if the supplied string name is nullptr)
NO_GRID_LINESNo grid lines will be displayed
NO_TICK_MARKSNo tick marks will be displayed
NO_TICK_LABELSNo text labels will be displayed
NO_INITIAL_FITAxis will not be initially fit to data extents on the first rendered frame
NO_MENUSThe user will not be able to open context menus with right-click
NO_SIDE_SWITCHThe user will not be able to switch the axis side by dragging it
NO_HIGHLIGHTThe axis will not have its background highlighted when hovered or held
OPPOSITEAxis ticks and labels will be rendered on the conventionally opposite side (i.e, right or top)
FOREGROUNDGrid lines will be displayed in the foreground (i.e. on top of data) instead of the background
INVERTThe axis will be inverted
AUTO_FITAxis will be auto-fitting to data extents
RANGE_FITAxis will only fit points if the point is in the visible range of the **orthogonal** axis
PAN_STRETCHPanning in a locked or constrained state will cause the axis to stretch if possible
LOCK_MINThe axis minimum value will be locked when panning/zooming
LOCK_MAXThe axis maximum value will be locked when panning/zooming
LOCK
NO_DECORATIONS
AUX_DEFAULT
BarGroupsFlags (enum)
NONEDefault
HORIZONTALBar groups will be rendered horizontally on the current y-axis
STACKEDItems in a group will be stacked on top of each other
BarsFlags (enum)
NONEDefault
HORIZONTALBars will be rendered horizontally on the current y-axis
ColormapScaleFlags (enum)
NONEDefault
NO_LABELThe colormap axis label will not be displayed
OPPOSITERender the colormap label and tick labels on the opposite side
INVERTInvert the colormap bar and axis scale (this only affects rendering; if you only want to reverse the scale mapping, make scale_min > scale_max)
DigitalFlags (enum)
NONEDefault
DragToolFlags (enum)
NONEDefault
NO_CURSORSDrag tools won't change cursor icons when hovered or held
NO_FITThe drag tool won't be considered for plot fits
NO_INPUTSLock the tool from user inputs
DELAYEDTool rendering will be delayed one frame; useful when applying position-constraints
DummyFlag (enum)
NONEDefault
ErrorBarsFlags (enum)
NONEDefault
HORIZONTALError bars will be rendered horizontally on the current y-axis
HeatmapFlags (enum)
NONEDefault
COL_MAJORData will be read in column major order
HistogramFlags (enum)
NONEDefault
HORIZONTALHistogram bars will be rendered horizontally (not supported by PlotHistogram2D)
CUMULATIVEEach bin will contain its count plus the counts of all previous bins (not supported by PlotHistogram2D)
DENSITYCounts will be normalized, i.e. the PDF will be visualized, or the CDF will be visualized if Cumulative is also set
NO_OUTLIERSExclude values outside the specifed histogram range from the count toward normalizing and cumulative counts
COL_MAJORData will be read in column major order (not supported by plot_histogram)
ImageFlag (enum)
NONEDefault
InfLinesFlags (enum)
NONEDefault
HORIZONTALLines will be rendered horizontally on the current y-axis
ItemFlags (enum)
NONE
NO_LEGENDThe item won't have a legend entry displayed
NO_FITThe item won't be considered for plot fits
LegendFlags (enum)
NONEDefault
NO_BUTTONSLegend icons will not function as hide/show buttons
NO_HIGHLIGHT_ITEMPlot items will not be highlighted when their legend entry is hovered
NO_HIGHLIGHT_AXISAxes will not be highlighted when legend entries are hovered (only relevant if x/y-axis count > 1)
NO_MENUSThe user will not be able to open context menus with right-click
OUTSIDELegend will be rendered outside of the plot area
HORIZONTALLegend entries will be displayed horizontally
SORTLegend entries will be displayed in alphabetical order
LineFlags (enum)
NONEDefault
SEGMENTSA line segment will be rendered from every two consecutive points
LOOPThe last and first point will be connected to form a closed loop
SKIP_NA_NNaNs values will be skipped instead of rendered as missing data
NO_CLIPMarkers (if displayed) on the edge of a plot will not be clipped
SHADEDA filled region between the line and horizontal origin will be rendered; use PlotShaded for more advanced cases
MouseTextFlags (enum)
NONEDefault
NO_AUX_AXESOnly show the mouse position for primary axes
NO_FORMATAxes label formatters won't be used to render text
SHOW_ALWAYSAlways display mouse position even if plot not hovered
PieChartFlags (enum)
NONEDefault
NORMALIZEForce normalization of pie chart values (i.e. always make a full circle if sum < 0)
IGNORE_HIDDENIgnore hidden slices when drawing the pie chart (as if they were not there)
EXPLODINGExplode legend-hovered slice
PlotFlags (enum)
NONEDefault
NO_TITLEThe plot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. "##MyPlot")
NO_LEGENDThe legend will not be displayed
NO_MOUSE_TEXTThe mouse position, in plot coordinates, will not be displayed inside of the plot
NO_INPUTSThe user will not be able to interact with the plot
NO_MENUSThe user will not be able to open context menus
NO_BOX_SELECTThe user will not be able to box-select
NO_FRAMEThe ImGui frame will not be rendered
EQUALX and y axes pairs will be constrained to have the same units/pixel
CROSSHAIRSThe default mouse cursor will be replaced with a crosshair when hovered
CANVAS_ONLY
ScatterFlags (enum)
NONEDefault
NO_CLIPMarkers on the edge of a plot will not be clipped
ShadedFlags (enum)
NONEDefault
StairsFlags (enum)
NONEDefault
PRE_STEPThe y value is continued constantly to the left from every x position, i.e. the interval (x[i-1], x[i]] has the value y[i]
SHADEDA filled region between the stairs and horizontal origin will be rendered; use PlotShaded for more advanced cases
StemsFlags (enum)
NONEDefault
HORIZONTALStems will be rendered horizontally on the current y-axis
SubplotFlags (enum)
NONEDefault
NO_TITLEThe subplot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. "##MySubplot")
NO_LEGENDThe legend will not be displayed (only applicable if SubplotFlags.SHARE_ITEMS is enabled)
NO_MENUSThe user will not be able to open context menus with right-click
NO_RESIZEResize splitters between subplot cells will be not be provided
NO_ALIGNSubplot edges will not be aligned vertically or horizontally
SHARE_ITEMSItems across all subplots will be shared and rendered into a single legend entry
LINK_ROWSLink the y-axis limits of all plots in each row (does not apply to auxiliary axes)
LINK_COLSLink the x-axis limits of all plots in each column (does not apply to auxiliary axes)
LINK_ALL_XLink the x-axis limits in every plot in the subplot (does not apply to auxiliary axes)
LINK_ALL_YLink the y-axis limits in every plot in the subplot (does not apply to auxiliary axes)
COL_MAJORSubplots are added in column major order instead of the default row major order
TextFlag (enum)
NONEDefault
VERTICALText will be rendered vertically