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.

implot3d.h

ImPlot3D: 3D plots for Dear ImGui: lines, scatter, surfaces, meshes, rotated, panned and zoomed with the mouse.

The C++ API of ImPlot3D: the signatures and the documentation of its headers. This page is generated by litgen, the engine behind the Python bindings of Dear ImGui Bundle. Functions without Python bindings are not listed.

Start with: ImPlot3D::BeginPlot, ImPlot3D::EndPlot, ImPlot3D::PlotLine, ImPlot3D::PlotScatter, ImPlot3D::SetupAxes.

implot3d.h

Flags & Enumerations

ImPlot3DProp_ (enum)

enum ImPlot3DProp_

Plotting properties. These provide syntactic sugar for creating ImPlot3DSpec from (ImPlot3DProp,value) pairs

MemberValue
ImPlot3DProp_LineColor0Line color; IMPLOT3D_AUTO_COL will use next Colormap color
ImPlot3DProp_LineColors1Array of line colors (ImU32*); if None, use LineColor for all
ImPlot3DProp_LineWeight2Line weight in pixels
ImPlot3DProp_FillColor3Fill color (applies to shaded regions); IMPLOT3D_AUTO_COL will use next Colormap color
ImPlot3DProp_FillColors4Array of fill colors (ImU32*); if None, use FillColor for all
ImPlot3DProp_FillAlpha5Alpha multiplier (applies to FillColor, FillColors, MarkerFillColor, and MarkerFillColors)
ImPlot3DProp_Marker6Marker type
ImPlot3DProp_MarkerSize7Size of markers (radius) in pixels
ImPlot3DProp_MarkerSizes8Array of marker sizes (float*); if None, use MarkerSize for all
ImPlot3DProp_MarkerLineColor9Marker outline color; IMPLOT3D_AUTO_COL will use next LineColor
ImPlot3DProp_MarkerLineColors10Array of marker outline colors (ImU32*); if None, use MarkerLineColor for all
ImPlot3DProp_MarkerFillColor11Marker fill color; IMPLOT3D_AUTO_COL will use LineColor
ImPlot3DProp_MarkerFillColors12Array of marker fill colors (ImU32*); if None, use MarkerFillColor for all
ImPlot3DProp_Offset13Data index offset
ImPlot3DProp_Stride14Data stride in bytes; IMPLOT3D_AUTO will result in sizeof(T) where T is the type passed to PlotX
ImPlot3DProp_Flags15Optional item flags; can be composed from common ImPlot3DItemFlags and/or specialized ImPlot3DXFlags

ImPlot3DFlags_ (enum)

enum ImPlot3DFlags_

See it live: Plots › Plot Flags (also used in 5 other sections)

Plots › Plot Flags
Code from the demo
static ImPlot3DFlags flags = ImPlot3DFlags_None;

The type of its values in the API: typedef int ImPlot3DFlags;

Flags for ImPlot3D::BeginPlot()

MemberValue
ImPlot3DFlags_None = 00Default
ImPlot3DFlags_NoTitle = 1 << 01 << 0Hide plot title
ImPlot3DFlags_NoLegend = 1 << 11 << 1Hide plot legend
ImPlot3DFlags_NoMouseText = 1 << 21 << 2Hide mouse position in plot coordinates
ImPlot3DFlags_NoClip = 1 << 31 << 3Disable 3D box clipping
ImPlot3DFlags_NoMenus = 1 << 41 << 4The user will not be able to open context menus
ImPlot3DFlags_Equal = 1 << 51 << 5X, Y, and Z axes will be constrained to have the same units/pixel
ImPlot3DFlags_NoRotate = 1 << 61 << 6Lock rotation interaction
ImPlot3DFlags_NoPan = 1 << 71 << 7Lock panning/translation interaction
ImPlot3DFlags_NoZoom = 1 << 81 << 8Lock zoom interaction
ImPlot3DFlags_NoInputs = 1 << 91 << 9Disable all user inputs
ImPlot3DFlags_CanvasOnly = ImPlot3DFlags_NoTitle | ImPlot3DFlags_NoLegend | ImPlot3DFlags_NoMouseText, }Flags_NoTitle | Flags_NoLegend | Flags_NoMouseText

ImPlot3DCond_ (enum)

enum ImPlot3DCond_

The type of its values in the API: typedef int ImPlot3DCond;

Represents a condition for SetupAxisLimits etc. (same as ImGuiCond, but we only support a subset of those enums)

MemberValue
ImPlot3DCond_None = ImGuiCond_NoneCond_NoneNo condition (always set the variable), same as _Always
ImPlot3DCond_Always = ImGuiCond_AlwaysCond_AlwaysNo condition (always set the variable)
ImPlot3DCond_Once = ImGuiCond_OnceCond_OnceSet the variable once per runtime session (only the first call will succeed)

ImPlot3DCol_ (enum)

enum ImPlot3DCol_

The type of its values in the API: typedef int ImPlot3DCol;

MemberValue
ImPlot3DCol_TitleText0Title color
ImPlot3DCol_InlayText1Color for texts appearing inside of plots
ImPlot3DCol_FrameBg2Frame background color
ImPlot3DCol_PlotBg3Plot area background color
ImPlot3DCol_PlotBorder4Plot area border color
ImPlot3DCol_LegendBg5Legend background color
ImPlot3DCol_LegendBorder6Legend border color
ImPlot3DCol_LegendText7Legend text color
ImPlot3DCol_AxisText8Axis label and tick lables color
ImPlot3DCol_AxisGrid9Axis grid color
ImPlot3DCol_AxisTick10Axis tick color (defaults to AxisGrid)
ImPlot3DCol_AxisBg11Background color of axis hover region (defaults to transparent)
ImPlot3DCol_AxisBgHovered12Axis hover color (defaults to ImGuiCol_ButtonHovered)
ImPlot3DCol_AxisBgActive13Axis active color (defaults to ImGuiCol_ButtonActive)
ImPlot3DCol_COUNT, }14

ImPlot3DStyleVar_ (enum)

enum ImPlot3DStyleVar_

The type of its values in the API: typedef int ImPlot3DStyleVar;

Plot styling variables

MemberValue
ImPlot3DStyleVar_LineWeight0float, plot item line weight in pixels
ImPlot3DStyleVar_Marker1int, marker specification
ImPlot3DStyleVar_MarkerSize2float, marker size in pixels (roughly the marker’s “radius”)
ImPlot3DStyleVar_FillAlpha3float, alpha modifier applied to all plot item fills
ImPlot3DStyleVar_PlotDefaultSize4ImVec2, default size used when ImVec2(0,0) is passed to BeginPlot
ImPlot3DStyleVar_PlotMinSize5ImVec2, minimum size plot frame can be when shrunk
ImPlot3DStyleVar_PlotPadding6ImVec2, padding between widget frame and plot area, labels, or outside legends (i.e. main padding)
ImPlot3DStyleVar_LabelPadding7ImVec2, padding between axes labels, tick labels, and plot edge
ImPlot3DStyleVar_ViewScaleFactor8float, scale factor for 3D view, you can use it to make the whole plot larger or smaller
ImPlot3DStyleVar_LegendPadding9ImVec2, legend padding from plot edges
ImPlot3DStyleVar_LegendInnerPadding10ImVec2, legend inner padding from legend edges
ImPlot3DStyleVar_LegendSpacing11ImVec2, spacing between legend entries
ImPlot3DStyleVar_COUNT12

ImPlot3DMarker_ (enum)

enum ImPlot3DMarker_

See it live: Plots › Markers and Text (also used in 10 other sections)

Plots › Markers and Text
Code from the demo
if (ImPlot3D::BeginPlot("##MarkerStyles", ImVec2(-1, 0), ImPlot3DFlags_CanvasOnly)) {

    ImPlot3D::SetupAxes(nullptr, nullptr, nullptr, ImPlot3DAxisFlags_NoDecorations, ImPlot3DAxisFlags_NoDecorations,
                        ImPlot3DAxisFlags_NoDecorations);
    ImPlot3D::SetupAxesLimits(-0.5, 1.5, -0.5, 1.5, 0, ImPlot3DMarker_COUNT + 1);

    float xs[2] = {0, 0};
    float ys[2] = {0, 0};
    float zs[2] = {ImPlot3DMarker_COUNT, ImPlot3DMarker_COUNT + 1};

    // Filled markers
    for (int m = 0; m < ImPlot3DMarker_COUNT; ++m) {
        xs[1] = xs[0] + ImCos(zs[0] / float(ImPlot3DMarker_COUNT) * 2 * IM_PI) * 0.5f;
        ys[1] = ys[0] + ImSin(zs[0] / float(ImPlot3DMarker_COUNT) * 2 * IM_PI) * 0.5f;
...

The type of its values in the API: typedef int ImPlot3DMarker;

MemberValue
ImPlot3DMarker_None = -2-2No marker
ImPlot3DMarker_Auto = -1-1Automatic marker selection
ImPlot3DMarker_Circle0Circle marker (default)
ImPlot3DMarker_Square1Square maker
ImPlot3DMarker_Diamond2Diamond marker
ImPlot3DMarker_Up3Upward-pointing triangle marker
ImPlot3DMarker_Down4Downward-pointing triangle marker
ImPlot3DMarker_Left5Leftward-pointing triangle marker
ImPlot3DMarker_Right6Rightward-pointing triangle marker
ImPlot3DMarker_Cross7Cross marker (not fillable)
ImPlot3DMarker_Plus8Plus marker (not fillable)
ImPlot3DMarker_Asterisk9Asterisk marker (not fillable)
ImPlot3DMarker_COUNT10

ImPlot3DItemFlags_ (enum)

enum ImPlot3DItemFlags_

The type of its values in the API: typedef int ImPlot3DItemFlags;

Flags for items

MemberValue
ImPlot3DItemFlags_None = 00Default
ImPlot3DItemFlags_NoLegend = 1 << 01 << 0The item won’t have a legend entry displayed
ImPlot3DItemFlags_NoFit = 1 << 11 << 1The item won’t be considered for plot fits

ImPlot3DScatterFlags_ (enum)

enum ImPlot3DScatterFlags_

The type of its values in the API: typedef int ImPlot3DScatterFlags;

Flags for PlotScatter

MemberValue
ImPlot3DScatterFlags_None = 00Default
ImPlot3DScatterFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DScatterFlags_NoFit = ImPlot3DItemFlags_NoFit, }ItemFlags_NoFit

ImPlot3DLineFlags_ (enum)

enum ImPlot3DLineFlags_

The type of its values in the API: typedef int ImPlot3DLineFlags;

Flags for PlotLine

MemberValue
ImPlot3DLineFlags_None = 00Default
ImPlot3DLineFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DLineFlags_NoFit = ImPlot3DItemFlags_NoFitItemFlags_NoFit
ImPlot3DLineFlags_Segments = 1 << 101 << 10A line segment will be rendered from every two consecutive points
ImPlot3DLineFlags_Loop = 1 << 111 << 11The last and first point will be connected to form a closed loop
ImPlot3DLineFlags_SkipNaN = 1 << 121 << 12NaNs values will be skipped instead of rendered as missing data

ImPlot3DTriangleFlags_ (enum)

enum ImPlot3DTriangleFlags_

The type of its values in the API: typedef int ImPlot3DTriangleFlags;

Flags for PlotTriangle

MemberValue
ImPlot3DTriangleFlags_None = 00Default
ImPlot3DTriangleFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DTriangleFlags_NoFit = ImPlot3DItemFlags_NoFitItemFlags_NoFit
ImPlot3DTriangleFlags_NoLines = 1 << 101 << 10No lines will be rendered
ImPlot3DTriangleFlags_NoFill = 1 << 111 << 11No fill will be rendered
ImPlot3DTriangleFlags_NoMarkers = 1 << 121 << 12No markers will be rendered

ImPlot3DQuadFlags_ (enum)

enum ImPlot3DQuadFlags_

The type of its values in the API: typedef int ImPlot3DQuadFlags;

Flags for PlotQuad

MemberValue
ImPlot3DQuadFlags_None = 00Default
ImPlot3DQuadFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DQuadFlags_NoFit = ImPlot3DItemFlags_NoFitItemFlags_NoFit
ImPlot3DQuadFlags_NoLines = 1 << 101 << 10No lines will be rendered
ImPlot3DQuadFlags_NoFill = 1 << 111 << 11No fill will be rendered
ImPlot3DQuadFlags_NoMarkers = 1 << 121 << 12No markers will be rendered

ImPlot3DSurfaceFlags_ (enum)

enum ImPlot3DSurfaceFlags_

The type of its values in the API: typedef int ImPlot3DSurfaceFlags;

Flags for PlotSurface

MemberValue
ImPlot3DSurfaceFlags_None = 00Default
ImPlot3DSurfaceFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DSurfaceFlags_NoFit = ImPlot3DItemFlags_NoFitItemFlags_NoFit
ImPlot3DSurfaceFlags_NoLines = 1 << 101 << 10No lines will be rendered
ImPlot3DSurfaceFlags_NoFill = 1 << 111 << 11No fill will be rendered
ImPlot3DSurfaceFlags_NoMarkers = 1 << 121 << 12No markers will be rendered

ImPlot3DMeshFlags_ (enum)

enum ImPlot3DMeshFlags_

The type of its values in the API: typedef int ImPlot3DMeshFlags;

Flags for PlotMesh

MemberValue
ImPlot3DMeshFlags_None = 00Default
ImPlot3DMeshFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DMeshFlags_NoFit = ImPlot3DItemFlags_NoFitItemFlags_NoFit
ImPlot3DMeshFlags_NoLines = 1 << 101 << 10No lines will be rendered
ImPlot3DMeshFlags_NoFill = 1 << 111 << 11No fill will be rendered
ImPlot3DMeshFlags_NoMarkers = 1 << 121 << 12No markers will be rendered

ImPlot3DImageFlags_ (enum)

enum ImPlot3DImageFlags_

The type of its values in the API: typedef int ImPlot3DImageFlags;

Flags for PlotImage

MemberValue
ImPlot3DImageFlags_None = 00Default
ImPlot3DImageFlags_NoLegend = ImPlot3DItemFlags_NoLegendItemFlags_NoLegend
ImPlot3DImageFlags_NoFit = ImPlot3DItemFlags_NoFit, }ItemFlags_NoFit

ImPlot3DDummyFlags_ (enum)

enum ImPlot3DDummyFlags_

Flags for PlotDummy

MemberValue
ImPlot3DDummyFlags_None = 00Default

ImPlot3DLegendFlags_ (enum)

enum ImPlot3DLegendFlags_

The type of its values in the API: typedef int ImPlot3DLegendFlags;

Flags for legends

MemberValue
ImPlot3DLegendFlags_None = 00Default
ImPlot3DLegendFlags_NoButtons = 1 << 01 << 0Legend icons will not function as hide/show buttons
ImPlot3DLegendFlags_NoHighlightItem = 1 << 11 << 1Plot items will not be highlighted when their legend entry is hovered
ImPlot3DLegendFlags_Horizontal = 1 << 21 << 2Legend entries will be displayed horizontally

ImPlot3DLocation_ (enum)

enum ImPlot3DLocation_

The type of its values in the API: typedef int ImPlot3DLocation;

Used to position legend on a plot

MemberValue
ImPlot3DLocation_Center = 00Center-center
ImPlot3DLocation_North = 1 << 01 << 0Top-center
ImPlot3DLocation_South = 1 << 11 << 1Bottom-center
ImPlot3DLocation_West = 1 << 21 << 2Center-left
ImPlot3DLocation_East = 1 << 31 << 3Center-right
ImPlot3DLocation_NorthWest = ImPlot3DLocation_North | ImPlot3DLocation_WestLocation_North | Location_WestTop-left
ImPlot3DLocation_NorthEast = ImPlot3DLocation_North | ImPlot3DLocation_EastLocation_North | Location_EastTop-right
ImPlot3DLocation_SouthWest = ImPlot3DLocation_South | ImPlot3DLocation_WestLocation_South | Location_WestBottom-left
ImPlot3DLocation_SouthEast = ImPlot3DLocation_South | ImPlot3DLocation_EastLocation_South | Location_EastBottom-right

ImPlot3DAxisFlags_ (enum)

enum ImPlot3DAxisFlags_

The type of its values in the API: typedef int ImPlot3DAxisFlags;

Flags for axis

MemberValue
ImPlot3DAxisFlags_None = 00Default
ImPlot3DAxisFlags_NoLabel = 1 << 01 << 0No axis label will be displayed
ImPlot3DAxisFlags_NoGridLines = 1 << 11 << 1No grid lines will be displayed
ImPlot3DAxisFlags_NoTickMarks = 1 << 21 << 2No tick marks will be displayed
ImPlot3DAxisFlags_NoTickLabels = 1 << 31 << 3No tick labels will be displayed
ImPlot3DAxisFlags_LockMin = 1 << 41 << 4The axis minimum value will be locked when panning/zooming
ImPlot3DAxisFlags_LockMax = 1 << 51 << 5The axis maximum value will be locked when panning/zooming
ImPlot3DAxisFlags_AutoFit = 1 << 61 << 6Axis will be auto-fitting to data extents
ImPlot3DAxisFlags_Invert = 1 << 71 << 7The axis will be inverted
ImPlot3DAxisFlags_PanStretch = 1 << 81 << 8Panning in a locked or constrained state will cause the axis to stretch if possible
ImPlot3DAxisFlags_Lock = ImPlot3DAxisFlags_LockMin | ImPlot3DAxisFlags_LockMaxAxisFlags_LockMin | AxisFlags_LockMax
ImPlot3DAxisFlags_NoDecorations = ImPlot3DAxisFlags_NoLabel | ImPlot3DAxisFlags_NoGridLines | ImPlot3DAxisFlags_NoTickLabels, }AxisFlags_NoLabel | AxisFlags_NoGridLines | AxisFlags_NoTickLabels

ImAxis3D_ (enum)

enum ImAxis3D_

The type of its values in the API: typedef int ImAxis3D;

Axis indices

MemberValue
ImAxis3D_X = 00X-axis
ImAxis3D_Y1Y-axis
ImAxis3D_Z2Z-axis
ImAxis3D_COUNT, }3

ImPlane3D_ (enum)

enum ImPlane3D_

The type of its values in the API: typedef int ImPlane3D;

Plane indices

MemberValue
ImPlane3D_YZ = 00YZ plane (perpendicular to X-axis)
ImPlane3D_XZ1XZ plane (perpendicular to Y-axis)
ImPlane3D_XY2XY plane (perpendicular to Z-axis)
ImPlane3D_COUNT, }3

ImPlot3DScale_ (enum)

enum ImPlot3DScale_

See it live: Axes › Log Scale (also used in 1 other section)

Axes › Log Scale
Code from the demo
if (ImPlot3D::BeginPlot("Log Plot 3D", ImVec2(-1, 0))) {
    ImPlot3D::SetupAxisScale(ImAxis3D_X, ImPlot3DScale_Log10);
    ImPlot3D::SetupAxesLimits(0.1, 100, 0, 10, -1, 1);
    ImPlot3D::PlotLine("f(x) = x", xs, xs, zs, 1001);
    ImPlot3D::PlotLine("f(x) = sin(x)+1", xs, ys1, zs, 1001);
    ImPlot3D::PlotLine("f(x) = log(x)", xs, ys2, zs, 1001);
    ImPlot3D::PlotLine("f(x) = 10^x", xs, ys3, zs, 21);
    ImPlot3D::EndPlot();
}

The type of its values in the API: typedef int ImPlot3DScale;

Axis scale

MemberValue
ImPlot3DScale_Linear = 00Default linear scale
ImPlot3DScale_Log101Base 10 log scale
ImPlot3DScale_SymLog2Symmetric base 10 log scale

ImPlot3DColormap_ (enum)

enum ImPlot3DColormap_

The type of its values in the API: typedef int ImPlot3DColormap;

Colormaps

MemberValue
ImPlot3DColormap_Deep = 00Same as seaborn “deep”
ImPlot3DColormap_Dark = 11Same as matplotlib “Set1”
ImPlot3DColormap_Pastel = 22Same as matplotlib “Pastel1”
ImPlot3DColormap_Paired = 33Same as matplotlib “Paired”
ImPlot3DColormap_Viridis = 44Same as matplotlib “viridis”
ImPlot3DColormap_Plasma = 55Same as matplotlib “plasma”
ImPlot3DColormap_Hot = 66Same as matplotlib/MATLAB “hot”
ImPlot3DColormap_Cool = 77Same as matplotlib/MATLAB “cool”
ImPlot3DColormap_Pink = 88Same as matplotlib/MATLAB “pink”
ImPlot3DColormap_Jet = 99Same as matplotlib/MATLAB “jet”
ImPlot3DColormap_Twilight = 1010Same as matplotlib “twilight”
ImPlot3DColormap_RdBu = 1111Same as matplotlib “RdBu”
ImPlot3DColormap_BrBG = 1212Same as matplotlib “BrGB”
ImPlot3DColormap_PiYG = 1313Same as matplotlib “PiYG”
ImPlot3DColormap_Spectral = 1414Same as matplotlib “Spectral”
ImPlot3DColormap_Greys = 1515White/black

Specs API

ImPlot3DSpec (struct)

struct ImPlot3DSpec

Plot item styling specification. Provide these to PlotX functions to override styling, specify offsetting or stride, or set optional flags. This struct can be used in the following ways:

  1. By declaring and defining a struct instance:

   ImPlot3DSpec spec;
   spec.LineColor = ImVec4(1,0,0,1);
   spec.LineWeight = 2.0;
   spec.Marker = ImPlot3DMarker_Circle;
   spec.Flags = ImPlot3DItemFlags_NoLegend | ImPlot3DLineFlags_Segments;
   ImPlot3D::PlotLine("MyLine", xs, ys, zs, 100, spec);
  1. Inline using ImPlot3DProp,value pairs (order does NOT matter):

    ImPlot3D::PlotLine(“MyLine”, xs, ys, zs, 100, { ImPlot3DProp_LineColor, ImVec4(1,0,0,1),
    ImPlot3DProp_LineWeight, 2.0,
    ImPlot3DProp_Marker, ImPlot3DMarker_Circle,
    ImPlot3DProp_Flags, ImPlot3DItemFlags_NoLegend | ImPlot3DLineFlags_Segments

   });
Member
ImVec4 LineColor = IMPLOT3D_AUTO_COL;Line color; IMPLOT3D_AUTO_COL will use next Colormap color
float LineWeight = 1.0f;Line weight in pixels
ImVec4 FillColor = IMPLOT3D_AUTO_COL;Fill color (applies to shaded regions); IMPLOT3D_AUTO_COL will use next Colormap color
float FillAlpha = IMPLOT3D_AUTO;Alpha multiplier (applies to FillColor, FillColors, MarkerFillColor, and MarkerFillColors)
ImPlot3DMarker Marker = ImPlot3DMarker_Auto;Marker type
float MarkerSize = IMPLOT3D_AUTO;Size of markers (radius) in pixels
ImVec4 MarkerLineColor = IMPLOT3D_AUTO_COL;Marker outline color; IMPLOT3D_AUTO_COL will use LineColor
ImVec4 MarkerFillColor = IMPLOT3D_AUTO_COL;Marker fill color; IMPLOT3D_AUTO_COL will use LineColor
int Offset = 0;Data index offset
int Stride = IMPLOT3D_AUTO;Data stride in bytes; IMPLOT3D_AUTO will result in sizeof(T) where T is the type passed to PlotX
ImPlot3DItemFlags Flags =Optional item flags; can be composed from common ImPlot3DItemFlags and/or specialized ImPlot3DXFlags
``array of colors (np.uint32) for each line. Must have the same length as the data arrays. If None, use LineColor for all lines.
``array of colors (np.uint32) for each fill. Must have the same length as the data arrays. If None, use FillColor for all fills.
``array of colors (np.uint32) for each marker edge. Must have the same length as the data arrays. If None, use MarkerLineColor for all markers.
``array of colors (np.uint32) for each marker face. Must have the same length as the data arrays. If None, use MarkerFillColor for all markers.
``array of sizes (np.float32) for each marker. Must have the same length as the data arrays. If None, use MarkerSize for all markers.

Context

ImPlot3D::CreateContext

IMPLOT3D_API ImPlot3DContext* CreateContext();

Creates a new ImPlot3D context. Call this after ImGui::CreateContext

ImPlot3D::DestroyContext

IMPLOT3D_API void DestroyContext(ImPlot3DContext* ctx = nullptr);

Destroys an ImPlot3D context. Call this before ImGui::DestroyContext. None = destroy current context

ImPlot3D::GetCurrentContext

IMPLOT3D_API ImPlot3DContext* GetCurrentContext();

Returns the current ImPlot3D context. None if no context has been set

ImPlot3D::SetCurrentContext

IMPLOT3D_API void SetCurrentContext(ImPlot3DContext* ctx);

Sets the current ImPlot3D context

Begin/End Plot

ImPlot3D::BeginPlot

IMPLOT3D_API bool BeginPlot(const char* title_id, const ImVec2& size = ImVec2(-1, 0), ImPlot3DFlags flags = 0);

See it live: Plots › Line Plots (also used in 27 other sections)

Plots › Line Plots
Code from the demo
if (ImPlot3D::BeginPlot("Line Plots")) {
    ImPlot3D::SetupAxes("x", "y", "z");
    ImPlot3D::PlotLine("f(x)", xs1, ys1, zs1, 1001);
    ImPlot3D::PlotLine("g(x)", xs2, ys2, zs2, 20, {ImPlot3DProp_Marker, ImPlot3DMarker_Circle, ImPlot3DProp_Flags, ImPlot3DLineFlags_Segments});
    ImPlot3D::EndPlot();
}

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

if (ImPlot3D::BeginPlot(...)) {
    ImPlot3D::PlotLine(...);
    ...
    ImPlot3D::EndPlot();
}

Important notes:

ImPlot3D::EndPlot

IMPLOT3D_API void EndPlot();

See it live: Plots › Line Plots (also used in 27 other sections)

Plots › Line Plots
Code from the demo
if (ImPlot3D::BeginPlot("Line Plots")) {
    ImPlot3D::SetupAxes("x", "y", "z");
    ImPlot3D::PlotLine("f(x)", xs1, ys1, zs1, 1001);
    ImPlot3D::PlotLine("g(x)", xs2, ys2, zs2, 20, {ImPlot3DProp_Marker, ImPlot3DMarker_Circle, ImPlot3DProp_Flags, ImPlot3DLineFlags_Segments});
    ImPlot3D::EndPlot();
}

Only call if BeginPlot() returns True!

Setup

ImPlot3D::SetupAxis

IMPLOT3D_API void SetupAxis(ImAxis3D axis, const char* label = nullptr, ImPlot3DAxisFlags flags = 0);

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

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

if (ImPlot3D::BeginPlot(...)) {                     1) Begin a new plot
    ImPlot3D::SetupAxis(ImAxis3D_X, "My X-Axis");    2) Make Setup calls
    ImPlot3D::SetupAxis(ImAxis3D_Y, "My Y-Axis");
    ImPlot3D::SetupLegend(ImPlotLocation_North);
    ...
    ImPlot3D::SetupFinish();                        3) [Optional] Explicitly finish setup
    ImPlot3D::PlotLine(...);                        4) Plot items
    ...
    ImPlot3D::EndPlot();                            5) End the plot
}

Important notes:

ImPlot3D::SetupAxisLimits

IMPLOT3D_API void SetupAxisLimits(ImAxis3D axis, double v_min, double v_max, ImPlot3DCond cond = ImPlot3DCond_Once);

See it live: Plots › Realtime Plots

Plots › Realtime Plots
Code from the demo
ImPlot3D::SetupAxes("Time", "Mouse X", "Mouse Y", flags, flags, flags);
ImPlot3D::SetupAxisLimits(ImAxis3D_X, t - 10.0, t, ImPlot3DCond_Always);

Sets an axis range limits. If ImPlot3DCond_Always is used, the axis limits will be locked.
Note: To invert an axis, use ImPlot3DAxisFlags_Invert with SetupAxis instead of swapping min/max

ImPlot3D::SetupAxisScale

IMPLOT3D_API void SetupAxisScale(ImAxis3D axis, ImPlot3DScale scale);

See it live: Axes › Log Scale (also used in 1 other section)

Axes › Log Scale
Code from the demo
if (ImPlot3D::BeginPlot("Log Plot 3D", ImVec2(-1, 0))) {
    ImPlot3D::SetupAxisScale(ImAxis3D_X, ImPlot3DScale_Log10);
    ImPlot3D::SetupAxesLimits(0.1, 100, 0, 10, -1, 1);
    ImPlot3D::PlotLine("f(x) = x", xs, xs, zs, 1001);
    ImPlot3D::PlotLine("f(x) = sin(x)+1", xs, ys1, zs, 1001);
    ImPlot3D::PlotLine("f(x) = log(x)", xs, ys2, zs, 1001);
    ImPlot3D::PlotLine("f(x) = 10^x", xs, ys3, zs, 21);
    ImPlot3D::EndPlot();
}

Sets an axis’ scale using built-in options

ImPlot3D::SetupAxisLimitsConstraints

IMPLOT3D_API void SetupAxisLimitsConstraints(ImAxis3D axis, double v_min, double v_max);

See it live: Axes › Axis Constraints

Axes › Axis Constraints
Code from the demo
ImGui::DragFloat2("Limits Constraints", limit_constraints, 0.01f);
ImGui::DragFloat2("Zoom Constraints", zoom_constraints, 0.01f);
CHECKBOX_FLAG(flags, ImPlot3DAxisFlags_PanStretch);
if (ImPlot3D::BeginPlot("##AxisConstraints", ImVec2(-1, 0))) {
    ImPlot3D::SetupAxes("X", "Y", "Z", flags, flags, flags);
    ImPlot3D::SetupAxesLimits(-1, 1, -1, 1, -1, 1);
    ImPlot3D::SetupAxisLimitsConstraints(ImAxis3D_X, (double)limit_constraints[0], (double)limit_constraints[1]);
    ImPlot3D::SetupAxisLimitsConstraints(ImAxis3D_Y, (double)limit_constraints[0], (double)limit_constraints[1]);
    ImPlot3D::SetupAxisLimitsConstraints(ImAxis3D_Z, (double)limit_constraints[0], (double)limit_constraints[1]);
    ImPlot3D::SetupAxisZoomConstraints(ImAxis3D_X, (double)zoom_constraints[0], (double)zoom_constraints[1]);
    ImPlot3D::SetupAxisZoomConstraints(ImAxis3D_Y, (double)zoom_constraints[0], (double)zoom_constraints[1]);
    ImPlot3D::SetupAxisZoomConstraints(ImAxis3D_Z, (double)zoom_constraints[0], (double)zoom_constraints[1]);
    ImPlot3D::EndPlot();
}

Sets an axis’ limits constraints. The axis will be constrained to never go below #v_min or above #v_max

ImPlot3D::SetupAxisZoomConstraints

IMPLOT3D_API void SetupAxisZoomConstraints(ImAxis3D axis, double zoom_min, double zoom_max);

See it live: Axes › Axis Constraints

Axes › Axis Constraints
Code from the demo
ImGui::DragFloat2("Limits Constraints", limit_constraints, 0.01f);
ImGui::DragFloat2("Zoom Constraints", zoom_constraints, 0.01f);
CHECKBOX_FLAG(flags, ImPlot3DAxisFlags_PanStretch);
if (ImPlot3D::BeginPlot("##AxisConstraints", ImVec2(-1, 0))) {
    ImPlot3D::SetupAxes("X", "Y", "Z", flags, flags, flags);
    ImPlot3D::SetupAxesLimits(-1, 1, -1, 1, -1, 1);
    ImPlot3D::SetupAxisLimitsConstraints(ImAxis3D_X, (double)limit_constraints[0], (double)limit_constraints[1]);
    ImPlot3D::SetupAxisLimitsConstraints(ImAxis3D_Y, (double)limit_constraints[0], (double)limit_constraints[1]);
    ImPlot3D::SetupAxisLimitsConstraints(ImAxis3D_Z, (double)limit_constraints[0], (double)limit_constraints[1]);
    ImPlot3D::SetupAxisZoomConstraints(ImAxis3D_X, (double)zoom_constraints[0], (double)zoom_constraints[1]);
    ImPlot3D::SetupAxisZoomConstraints(ImAxis3D_Y, (double)zoom_constraints[0], (double)zoom_constraints[1]);
    ImPlot3D::SetupAxisZoomConstraints(ImAxis3D_Z, (double)zoom_constraints[0], (double)zoom_constraints[1]);
    ImPlot3D::EndPlot();
}

Sets an axis’ zoom constraints. The zoom (axis range size: range.max - range.min) will be constrained between #zoom_min and #zoom_max

ImPlot3D::SetupAxes

IMPLOT3D_API void SetupAxes(const char* x_label, const char* y_label, const char* z_label, ImPlot3DAxisFlags x_flags = 0, ImPlot3DAxisFlags y_flags = 0, ImPlot3DAxisFlags z_flags = 0);

See it live: Plots › Line Plots (also used in 11 other sections)

Plots › Line Plots
Code from the demo
if (ImPlot3D::BeginPlot("Line Plots")) {
    ImPlot3D::SetupAxes("x", "y", "z");
    ImPlot3D::PlotLine("f(x)", xs1, ys1, zs1, 1001);
    ImPlot3D::PlotLine("g(x)", xs2, ys2, zs2, 20, {ImPlot3DProp_Marker, ImPlot3DMarker_Circle, ImPlot3DProp_Flags, ImPlot3DLineFlags_Segments});
    ImPlot3D::EndPlot();
}

Sets the label and/or flags for primary X/Y/Z axes (shorthand for three calls to SetupAxis)

ImPlot3D::SetupAxesLimits

IMPLOT3D_API void SetupAxesLimits(double x_min, double x_max, double y_min, double y_max, double z_min, double z_max, ImPlot3DCond cond = ImPlot3DCond_Once);

See it live: Plots › Triangle Plots (also used in 16 other sections)

Plots › Triangle Plots
Code from the demo
if (ImPlot3D::BeginPlot("Triangle Plots")) {
    ImPlot3D::SetupAxesLimits(-1, 1, -1, 1, -0.5, 1.5);

    // Setup pyramid colors
    ImPlot3DSpec spec;
    spec.FillColor = ImPlot3D::GetColormapColor(0);
    spec.LineColor = ImPlot3D::GetColormapColor(1);
    spec.Marker = ImPlot3DMarker_Square;
    spec.MarkerSize = 3;
    spec.Flags = flags;

    // Plot pyramid
    ImPlot3D::PlotTriangle("Pyramid", xs, ys, zs, 6 * 3, spec); // 6 triangles, 3 vertices each = 18
    ImPlot3D::EndPlot();
...

Sets the X/Y/Z axes range limits. If ImPlot3DCond_Always is used, the axes limits will be locked (shorthand for three calls to SetupAxisLimits)

ImPlot3D::SetupBoxRotation

IMPLOT3D_API void SetupBoxRotation(double elevation, double azimuth, bool animate = false, ImPlot3DCond cond = ImPlot3DCond_Once);
IMPLOT3D_API void SetupBoxRotation(ImPlot3DQuat rotation, bool animate = false, ImPlot3DCond cond = ImPlot3DCond_Once);

See it live: Axes › Box Rotation

Axes › Box Rotation
Code from the demo
if (changed)
    ImPlot3D::SetupBoxRotation(elevation, azimuth, animate, ImPlot3DCond_Always);

Sets the plot box rotation given the elevation and azimuth angles in degrees. If ImPlot3DCond_Always is used, the rotation will be locked

ImPlot3D::SetupBoxInitialRotation

IMPLOT3D_API void SetupBoxInitialRotation(double elevation, double azimuth);
IMPLOT3D_API void SetupBoxInitialRotation(ImPlot3DQuat rotation);

See it live: Axes › Box Rotation

Axes › Box Rotation
Code from the demo
if (ImPlot3D::BeginPlot("##BoxRotation")) {
    ImPlot3D::SetupAxesLimits(-1, 1, -1, 1, -1, 1, ImPlot3DCond_Always);

    // Set initial rotation
    ImPlot3D::SetupBoxInitialRotation(init_elevation, init_azimuth);

    // Set the rotation using the specified elevation and azimuth
    if (changed)
        ImPlot3D::SetupBoxRotation(elevation, azimuth, animate, ImPlot3DCond_Always);

    // Plot axis lines
    ImPlot3D::PlotLine("X-Axis", axis, origin, origin, 2, {ImPlot3DProp_LineColor, ImVec4(0.8f, 0.2f, 0.2f, 1)});
    ImPlot3D::PlotLine("Y-Axis", origin, axis, origin, 2, {ImPlot3DProp_LineColor, ImVec4(0.2f, 0.8f, 0.2f, 1)});
    ImPlot3D::PlotLine("Z-Axis", origin, origin, axis, 2, {ImPlot3DProp_LineColor, ImVec4(0.2f, 0.2f, 0.8f, 1)});
...

Sets the plot box initial rotation given the elevation and azimuth angles in degrees. The initial rotation is the rotation the plot goes back to when a left mouse button double click happens

ImPlot3D::SetupBoxScale

IMPLOT3D_API void SetupBoxScale(double x, double y, double z);

See it live: Axes › Box Scale

Axes › Box Scale
Code from the demo
if (ImPlot3D::BeginPlot("##BoxScale")) {
    ImPlot3D::SetupBoxScale(scale[0], scale[1], scale[2]);
    ImPlot3D::PlotLine("3D Curve", xs, ys, zs, N);
    ImPlot3D::EndPlot();
}

Sets the plot box X/Y/Z scale. A scale of 1.0 is the default. Values greater than 1.0 enlarge the plot, while values between 0.0 and 1.0 shrink it

ImPlot3D::SetupLegend

IMPLOT3D_API void SetupLegend(ImPlot3DLocation location, ImPlot3DLegendFlags flags = 0);

See it live: Plots › Legend Options

Plots › Legend Options
Code from the demo
if (ImPlot3D::BeginPlot("Legend Options Demo", ImVec2(-1, 0))) {
    ImPlot3D::SetupAxes("X-Axis", "Y-Axis", "Z-Axis");
    ImPlot3D::SetupAxesLimits(-1, 1, -1, 1, -1, 1);
    ImPlot3D::SetupLegend(loc, flags);

    // Generate some 3D line data
    static float t = 0;
    t += ImGui::GetIO().DeltaTime * 0.5f;

    constexpr int count = 50;
    static float xs1[count], ys1[count], zs1[count];
    static float xs2[count], ys2[count], zs2[count];
    static float xs3[count], ys3[count], zs3[count];

...

Sets up the plot legend location and flags

Plot Items

ImPlot3D::PlotScatter

IMPLOT3D_TMP void PlotScatter(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Scatter Plots (also used in 6 other sections)

Plots › Scatter Plots
Code from the demo
if (ImPlot3D::BeginPlot("Scatter Plots")) {
    ImPlot3D::PlotScatter("Data 1", xs1, ys1, zs1, 100);
    ImPlot3DSpec spec;
    spec.Marker = ImPlot3DMarker_Square;
    spec.MarkerSize = 6;
    spec.MarkerLineColor = ImPlot3D::GetColormapColor(1);
    spec.MarkerFillColor = ImPlot3D::GetColormapColor(1);
    spec.FillAlpha = 0.25f;
    ImPlot3D::PlotScatter("Data 2", xs2, ys2, zs2, 50, spec);
    ImPlot3D::EndPlot();
}

Plots a scatter plot in 3D. Points are rendered as markers at the specified coordinates

The plotting API is provided below. Call these functions between
BeginPlot/EndPlot and after any Setup API calls.
The templated functions are explicitly instantiated in implot3d_items.cpp.
They are not intended to be used generically with custom types. You will get a linker error if you try! All functions support the following scalar types: float, double, ImS8, ImU8, ImS16, ImU16, ImS32, ImU32, ImS64, ImU64
If you need to plot custom or non-homogenous data you have a few options:

  1. If your data is a simple struct/class (e.g. Vector3f), you can use striding.
    This is the most performant option if applicable.

   struct Vector3f { float X, Y, Z; };
   ...
   Vector3f data[42];
   ImPlot3D::PlotLine("line", &data[0].X, &data[0].Y, &data[0].Z, 42, {ImPlot3DProp_Stride, sizeof(Vector2f)});
  1. If your data is in separate arrays or requires computation, you can copy/transform it into temporary float or double arrays before plotting.
    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!

ImPlot3D::PlotLine

IMPLOT3D_TMP void PlotLine(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Line Plots (also used in 16 other sections)

Plots › Line Plots
Code from the demo
if (ImPlot3D::BeginPlot("Line Plots")) {
    ImPlot3D::SetupAxes("x", "y", "z");
    ImPlot3D::PlotLine("f(x)", xs1, ys1, zs1, 1001);
    ImPlot3D::PlotLine("g(x)", xs2, ys2, zs2, 20, {ImPlot3DProp_Marker, ImPlot3DMarker_Circle, ImPlot3DProp_Flags, ImPlot3DLineFlags_Segments});
    ImPlot3D::EndPlot();
}

Plots a line in 3D. Consecutive points are connected with line segments

ImPlot3D::PlotTriangle

IMPLOT3D_TMP void PlotTriangle(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Triangle Plots (also used in 1 other section)

Plots › Triangle Plots
Code from the demo
ImPlot3D::PlotTriangle("Pyramid", xs, ys, zs, 6 * 3, spec); // 6 triangles, 3 vertices each = 18
ImPlot3D::EndPlot();

Plots triangles in 3D. Every 3 consecutive points define a triangle

ImPlot3D::PlotQuad

IMPLOT3D_TMP void PlotQuad(const char* label_id, const T* xs, const T* ys, const T* zs, int count, const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Quad Plots (also used in 1 other section)

Plots › Quad Plots
Code from the demo
static ImVec4 colorX(0.8f, 0.2f, 0.2f, 0.8f); // Red
spec.FillColor = colorX;
spec.LineColor = colorX;
ImPlot3D::PlotQuad("X", &xs[0], &ys[0], &zs[0], 8, spec);

Plots quads in 3D. Every 4 consecutive points define a quadrilateral

ImPlot3D::PlotSurface

IMPLOT3D_TMP void PlotSurface( const char* label_id, const T* xs, int xs_count, const T* ys, int ys_count, const T* zs, int zs_count, int x_count, int y_count, double scale_min = 0.0, double scale_max = 0.0, const ImPlot3DSpec& spec = ImPlot3DSpec() );

See it live: Plots › Surface Plots

Plots › Surface Plots
Code from the demo
if (custom_range)
    ImPlot3D::PlotSurface("Wave Surface", xs, ys, zs, N, N, (double)range_min, (double)range_max, spec);

Plot the surface defined by a grid of vertices. The grid is defined by the x and y arrays, and the z array contains the height of each vertex.
A total of x_count * y_count vertices are expected for each array.
Leave #scale_min and #scale_max both at 0 for automatic color scaling, or set them to a predefined range.

A version of PlotSurface whose API is easier to port to Python (params xs_count, ys_count and zs_count are removed in the Python API, but are used in the bindings code generation)

Mesh (struct)

struct Mesh
Member
std::vector<ImPlot3DPoint> Points;
std::vector<UInt> Idx;Triangles are defined by the index buffer (every 3 indices form a triangle)

ImPlot3D::PlotMesh

IMPLOT3D_API void PlotMesh(const char* label_id, const Mesh& mesh, const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Mesh Plots (also used in 1 other section)

Plots › Mesh Plots
Code from the demo
if (mesh_id == 0)
    ImPlot3D::PlotMesh("Duck", &duck_vtx[0].x, &duck_vtx[0].y, &duck_vtx[0].z, duck_idx, DUCK_VTX_COUNT, DUCK_IDX_COUNT, spec);

ImPlot3D::PlotImage

IMPLOT3D_API void PlotImage(const char* label_id, ImTextureRef tex_ref, const ImPlot3DPoint& center, const ImPlot3DPoint& axis_u, const ImPlot3DPoint& axis_v, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImPlot3DSpec& spec = ImPlot3DSpec());
IMPLOT3D_API void PlotImage(const char* label_id, ImTextureRef tex_ref, const ImPlot3DPoint& p0, const ImPlot3DPoint& p1, const ImPlot3DPoint& p2, const ImPlot3DPoint& p3, const ImVec2& uv0 = ImVec2(0, 0), const ImVec2& uv1 = ImVec2(1, 0), const ImVec2& uv2 = ImVec2(1, 1), const ImVec2& uv3 = ImVec2(0, 1), const ImVec4& tint_col = ImVec4(1, 1, 1, 1), const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Image Plots

Plots › Image Plots
Code from the demo
ImPlot3D::PlotImage("Image 1", tex, center1, axis_u1, axis_v1, uv0_1, uv1_1, tint1);

Plots a rectangular image in 3D defined by its center and two direction vectors (axes).
#center is the center of the rectangle in plot coordinates.
#axis_u and #axis_v define the local axes and half-extents of the rectangle in 3D space.
The rectangle is formed by moving from the center along ±axis_u and ±axis_v.
#uv0 and #uv1 define the texture mapping.
#tint_col can be used to tint the image.

[/ADAPT_IMGUI_BUNDLE]

ImPlot3D::PlotText

IMPLOT3D_API void PlotText(const char* text, double x, double y, double z, double angle = 0.0, const ImVec2& pix_offset = ImVec2(0, 0));

See it live: Plots › Markers and Text

Plots › Markers and Text
Code from the demo
ImPlot3D::PlotText("Filled Markers", 0.0, 0.0, 6.0);

Plots a centered text label at point x,y,z with optional rotation angle (in radians) and pixel offset

ImPlot3D::PlotDummy

IMPLOT3D_API void PlotDummy(const char* label_id, const ImPlot3DSpec& spec = ImPlot3DSpec());

See it live: Plots › Legend Options (also used in 1 other section)

Plots › Legend Options
Code from the demo
for (int i = 0; i < num_dummy_items; ++i) {
    char label[32];
    snprintf(label, sizeof(label), "Item %03d", i);
    ImPlot3D::PlotDummy(label);
}

Plots a dummy item (can be used to modify legend entry appearance when called after plotting an item, or add a dummy legend entry)

Plot Utils

ImPlot3D::PlotToPixels

IMPLOT3D_API ImVec2 PlotToPixels(const ImPlot3DPoint& point);
IMPLOT3D_API ImVec2 PlotToPixels(double x, double y, double z);

See it live: Custom › Custom Rendering (also used in 1 other section)

Custom › Custom Rendering
Code from the demo
if (ImPlot3D::BeginPlot("##CustomRend")) {
    ImPlot3D::SetupAxesLimits(-0.1, 1.1, -0.1, 1.1, -0.1, 1.1);

    // Draw circle
    ImVec2 cntr = ImPlot3D::PlotToPixels(ImPlot3DPoint(0.5, 0.5, 0.5));
    ImPlot3D::GetPlotDrawList()->AddCircleFilled(cntr, 20, IM_COL32(255, 255, 0, 255), 20);

    // Draw box
    ImPlot3DPoint corners[8] = {
        ImPlot3DPoint(0, 0, 0), ImPlot3DPoint(1, 0, 0), ImPlot3DPoint(1, 1, 0), ImPlot3DPoint(0, 1, 0),
        ImPlot3DPoint(0, 0, 1), ImPlot3DPoint(1, 0, 1), ImPlot3DPoint(1, 1, 1), ImPlot3DPoint(0, 1, 1),
    };
    ImVec2 corners_px[8];
    for (int i = 0; i < 8; i++)
...

Convert a position in the current plot’s coordinate system to pixels

ImPlot3D::PixelsToPlotRay

IMPLOT3D_API ImPlot3DRay PixelsToPlotRay(const ImVec2& pix);
IMPLOT3D_API ImPlot3DRay PixelsToPlotRay(double x, double y);

See it live: Tools › Mouse Picking

Tools › Mouse Picking
Code from the demo
if (ImPlot3D::BeginPlot("Mouse Picking", ImVec2(-1, 0), ImPlot3DFlags_NoClip)) {
    ImPlot3D::SetupAxes("X-Axis", "Y-Axis", "Z-Axis");
    ImPlot3D::SetupAxesLimits(-1, 1, -1, 1, -1, 1);

    // Get mouse position and convert to ray
    ImVec2 mouse_pos = ImGui::GetMousePos();
    ImPlot3DRay ray = ImPlot3D::PixelsToPlotRay(mouse_pos);

    // Convert to selected plane
    ImPlane3D plane = (ImPlane3D)selected_plane;
    ImPlot3DPoint point = ImPlot3D::PixelsToPlotPlane(mouse_pos, plane, mask_plane);

    // Show intersection point
    if (ImGui::IsItemHovered() && !point.IsNaN()) {
...

Convert a pixel coordinate to a ray in the current plot’s coordinate system. Useful for 3D picking and intersection tests

ImPlot3D::PixelsToPlotPlane

IMPLOT3D_API ImPlot3DPoint PixelsToPlotPlane(const ImVec2& pix, ImPlane3D plane, bool mask = true);
IMPLOT3D_API ImPlot3DPoint PixelsToPlotPlane(double x, double y, ImPlane3D plane, bool mask = true);

See it live: Tools › Mouse Picking

Tools › Mouse Picking
Code from the demo
ImPlane3D plane = (ImPlane3D)selected_plane;
ImPlot3DPoint point = ImPlot3D::PixelsToPlotPlane(mouse_pos, plane, mask_plane);

Convert a pixel coordinate to a point on one of the plot box’s axis-aligned planes (XY, XZ, or YZ).
By default, the result is masked to the axis ranges. Set #mask=False to project to the infinite plane.
Returns ImPlot3DPoint(NAN, NAN, NAN) if the ray does not intersect the plane

ImPlot3D::GetPlotRectPos

IMPLOT3D_API ImVec2 GetPlotRectPos();

See it live: Custom › Custom Overlay

Custom › Custom Overlay
Code from the demo
if (ImPlot3D::BeginPlot("##CustomOverlay", ImVec2(-1, 0))) {
    ImPlot3D::SetupAxes("X-Axis", "Y-Axis", "Z-Axis");
    ImPlot3D::SetupAxesLimits(0, 1, 0, 1, 0, 1);
    ImPlot3D::PlotScatter("Data", xs, ys, zs, 50);

    ImDrawList* draw_list = ImPlot3D::GetPlotDrawList();
    ImVec2 mouse_pos = ImGui::GetMousePos();
    ImVec2 plot_pos = ImPlot3D::GetPlotRectPos();
    ImVec2 plot_size = ImPlot3D::GetPlotRectSize();

    // Check if mouse is over plot
    bool is_hovered = ImGui::IsItemHovered();

    if (is_hovered) {
...

Get the current plot rect position (top-left) in absolute screen coordinates

ImPlot3D::GetPlotRectSize

IMPLOT3D_API ImVec2 GetPlotRectSize();

See it live: Custom › Custom Overlay

Custom › Custom Overlay
Code from the demo
ImDrawList* draw_list = ImPlot3D::GetPlotDrawList();
ImVec2 mouse_pos = ImGui::GetMousePos();
ImVec2 plot_pos = ImPlot3D::GetPlotRectPos();
ImVec2 plot_size = ImPlot3D::GetPlotRectSize();

Get the current plot rect size in pixels

Miscellaneous

ImPlot3D::GetPlotDrawList

IMPLOT3D_API ImDrawList* GetPlotDrawList();

See it live: Custom › Custom Rendering (also used in 1 other section)

Custom › Custom Rendering
Code from the demo
if (ImPlot3D::BeginPlot("##CustomRend")) {
    ImPlot3D::SetupAxesLimits(-0.1, 1.1, -0.1, 1.1, -0.1, 1.1);

    // Draw circle
    ImVec2 cntr = ImPlot3D::PlotToPixels(ImPlot3DPoint(0.5, 0.5, 0.5));
    ImPlot3D::GetPlotDrawList()->AddCircleFilled(cntr, 20, IM_COL32(255, 255, 0, 255), 20);

    // Draw box
    ImPlot3DPoint corners[8] = {
        ImPlot3DPoint(0, 0, 0), ImPlot3DPoint(1, 0, 0), ImPlot3DPoint(1, 1, 0), ImPlot3DPoint(0, 1, 0),
        ImPlot3DPoint(0, 0, 1), ImPlot3DPoint(1, 0, 1), ImPlot3DPoint(1, 1, 1), ImPlot3DPoint(0, 1, 1),
    };
    ImVec2 corners_px[8];
    for (int i = 0; i < 8; i++)
...

Returns the ImDrawList used for rendering plot items. Use this to add custom rendering inside plots

Styles API

Get current style

ImPlot3D::GetStyle

IMPLOT3D_API ImPlot3DStyle& GetStyle();

See it live: Custom › Custom Styles (also used in 2 other sections)

Custom › Custom Styles
Code from the demo
ImPlot3DStyle backup = ImPlot3D::GetStyle();

ImPlot3D::SetStyle

IMPLOT3D_API void SetStyle(const ImPlot3DStyle& style);

Set color styles

ImPlot3D::StyleColorsAuto

IMPLOT3D_API void StyleColorsAuto(ImPlot3DStyle* dst = nullptr);

Set colors with ImGui style

ImPlot3D::StyleColorsDark

IMPLOT3D_API void StyleColorsDark(ImPlot3DStyle* dst = nullptr);

Set colors with dark style

ImPlot3D::StyleColorsLight

IMPLOT3D_API void StyleColorsLight(ImPlot3DStyle* dst = nullptr);

Set colors with light style

ImPlot3D::StyleColorsClassic

IMPLOT3D_API void StyleColorsClassic(ImPlot3DStyle* dst = nullptr);

Set colors with classic style

ImPlot3D::PushStyleColor

IMPLOT3D_API void PushStyleColor(ImPlot3DCol idx, ImU32 col);
IMPLOT3D_API void PushStyleColor(ImPlot3DCol idx, const ImVec4& col);

See it live: Plots › Markers and Text

Plots › Markers and Text
Code from the demo
ImPlot3D::PushStyleColor(ImPlot3DCol_InlayText, ImVec4(1, 0, 1, 1));

Temporarily modify a style color. Don’t forget to call PopStyleColor!

ImPlot3D::PopStyleColor

IMPLOT3D_API void PopStyleColor(int count = 1);

See it live: Plots › Markers and Text

Plots › Markers and Text
Code from the demo
ImPlot3D::PushStyleColor(ImPlot3DCol_InlayText, ImVec4(1, 0, 1, 1));
ImPlot3D::PlotText("Rotated Text", 0.5, 0.5, 6.0, IM_PI / 4, ImVec2(0, 0));
ImPlot3D::PopStyleColor();

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

ImPlot3D::PushStyleVar

IMPLOT3D_API void PushStyleVar(ImPlot3DStyleVar idx, int val);
IMPLOT3D_API void PushStyleVar(ImPlot3DStyleVar idx, float val);
IMPLOT3D_API void PushStyleVar(ImPlot3DStyleVar idx, const ImVec2& val);

Temporarily modify a style variable of int type. Don’t forget to call PopStyleVar!

ImPlot3D::PopStyleVar

IMPLOT3D_API void PopStyleVar(int count = 1);

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

Get color

ImPlot3D::GetStyleColorVec4

IMPLOT3D_API ImVec4 GetStyleColorVec4(ImPlot3DCol idx);

ImPlot3D::GetStyleColorU32

IMPLOT3D_API ImU32 GetStyleColorU32(ImPlot3DCol idx);

ImPlot3D::NextMarker

IMPLOT3D_API ImPlot3DMarker NextMarker();

Returns the next marker and advances the marker for the current plot. You need to call this between Begin/EndPlot!

Colormaps

ImPlot3D::AddColormap

IMPLOT3D_API ImPlot3DColormap AddColormap(const char* name, const ImVec4* cols, int size, bool qual = true);
IMPLOT3D_API ImPlot3DColormap AddColormap(const char* name, const ImU32* cols, int size, bool qual = true);

Item styling is based on colormaps when the relevant ImPlot3DCol_XXX is set to
IMPLOT3D_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 ImPlot3DStyle.

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 ImPlot3DStyle to anything other than IMPLOT3D_AUTO_COL.

Add a new colormap. The color data will be copied. The colormap can be used by pushing either the returned index or the string name with PushColormap. The colormap name must be unique and the size must be greater than 1. You will receive an assert otherwise! By default colormaps are considered to be qualitative (i.e. discrete). If you want to create a continuous colormap, set #qual=False. This will treat the colors you provide as keys, and ImPlot3D will build a linearly interpolated lookup table. The memory footprint of this table will be exactly ((size-1)*255+1)*4 bytes.

ImPlot3D::GetColormapCount

IMPLOT3D_API int GetColormapCount();

See it live: Custom › Custom Per-Point Style

Custom › Custom Per-Point Style
Code from the demo
ImGui::SliderFloat("Marker Size", &marker_size, 2.0f, 10.0f);
if (ImGui::BeginCombo("Colormap", ImPlot3D::GetColormapName(cmap))) {
    ImPlot3DContext& gp = *GImPlot3D;
    for (int i = 0; i < ImPlot3D::GetColormapCount(); i++) {
        // Only show continuous colormaps
        if (!gp.ColormapData.IsQual(i)) {
            if (ImGui::Selectable(ImPlot3D::GetColormapName(i), cmap == i))
                cmap = i;
        }
    }
    ImGui::EndCombo();
}

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

ImPlot3D::GetColormapName

IMPLOT3D_API const char* GetColormapName(ImPlot3DColormap cmap);

See it live: Custom › Custom Per-Point Style

Custom › Custom Per-Point Style
Code from the demo
ImGui::SliderFloat("Marker Size", &marker_size, 2.0f, 10.0f);
if (ImGui::BeginCombo("Colormap", ImPlot3D::GetColormapName(cmap))) {
    ImPlot3DContext& gp = *GImPlot3D;
    for (int i = 0; i < ImPlot3D::GetColormapCount(); i++) {
        // Only show continuous colormaps
        if (!gp.ColormapData.IsQual(i)) {
            if (ImGui::Selectable(ImPlot3D::GetColormapName(i), cmap == i))
                cmap = i;
        }
    }
    ImGui::EndCombo();
}

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

ImPlot3D::GetColormapIndex

IMPLOT3D_API ImPlot3DColormap GetColormapIndex(const char* name);

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

ImPlot3D::PushColormap

IMPLOT3D_API void PushColormap(ImPlot3DColormap cmap);
IMPLOT3D_API void PushColormap(const char* name);

See it live: Plots › Surface Plots (also used in 2 other sections)

Plots › Surface Plots
Code from the demo
if (selected_fill == 1)
    ImPlot3D::PushColormap(colormaps[sel_colormap]);

Temporarily switch to one of the built-in (i.e. ImPlot3DColormap_XXX) or user-added colormaps (i.e. a return value of AddColormap). Don’t forget to call PopColormap!

ImPlot3D::PopColormap

IMPLOT3D_API void PopColormap(int count = 1);

See it live: Plots › Surface Plots (also used in 2 other sections)

Plots › Surface Plots
Code from the demo
if (selected_fill == 1)
    ImPlot3D::PopColormap();

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

ImPlot3D::NextColormapColor

IMPLOT3D_API ImVec4 NextColormapColor();

See it live: Custom › Custom Styles

Custom › Custom Styles
Code from the demo
ImPlot3DStyle backup = ImPlot3D::GetStyle();
MyImPlot3D::StyleSeaborn();
if (ImPlot3D::BeginPlot("Seaborn Style")) {
    ImPlot3D::SetupAxes("X-axis", "Y-axis", "Z-axis");
    ImPlot3D::SetupAxesLimits(-0.5, 9.5, -0.5, 0.5, 0, 10);
    unsigned int xs[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    unsigned int ys[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    unsigned int lin[10] = {8, 8, 9, 7, 8, 8, 8, 9, 7, 8};
    unsigned int dot[10] = {7, 6, 6, 7, 8, 5, 6, 5, 8, 7};
    ImPlot3D::NextColormapColor(); // Skip blue
    ImPlot3D::PlotLine("Line", xs, ys, lin, 10);
    ImPlot3D::NextColormapColor(); // Skip green
    ImPlot3D::PlotScatter("Scatter", xs, ys, dot, 10);
    ImPlot3D::EndPlot();
...

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 it between Begin/EndPlot!

ImPlot3D::GetColormapSize

IMPLOT3D_API int GetColormapSize(ImPlot3DColormap cmap = IMPLOT3D_AUTO);

Returns the size of a colormap

ImPlot3D::GetColormapColor

IMPLOT3D_API ImVec4 GetColormapColor(int idx, ImPlot3DColormap cmap = IMPLOT3D_AUTO);

See it live: Plots › Scatter Plots (also used in 2 other sections)

Plots › Scatter Plots
Code from the demo
if (ImPlot3D::BeginPlot("Scatter Plots")) {
    ImPlot3D::PlotScatter("Data 1", xs1, ys1, zs1, 100);
    ImPlot3DSpec spec;
    spec.Marker = ImPlot3DMarker_Square;
    spec.MarkerSize = 6;
    spec.MarkerLineColor = ImPlot3D::GetColormapColor(1);
    spec.MarkerFillColor = ImPlot3D::GetColormapColor(1);
    spec.FillAlpha = 0.25f;
    ImPlot3D::PlotScatter("Data 2", xs2, ys2, zs2, 50, spec);
    ImPlot3D::EndPlot();
}

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

ImPlot3D::SampleColormap

IMPLOT3D_API ImVec4 SampleColormap(float t, ImPlot3DColormap cmap = IMPLOT3D_AUTO);

See it live: Plots › Per-Index Colors (also used in 1 other section)

Plots › Per-Index Colors
Code from the demo
static float xs2[20], ys2[20], zs2[20];
static ImU32 colors2[20];
for (int i = 0; i < 20; ++i) {
    xs2[i] = i * 1 / 19.0f;
    ys2[i] = xs2[i] * xs2[i];
    zs2[i] = xs2[i] * ys2[i];
    // Colormap colors (Viridis)
    float t = i / 19.0f;
    ImVec4 color = ImPlot3D::SampleColormap(t, ImPlot3DColormap_Viridis);
    colors2[i] = ImGui::GetColorU32(color);
}

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

Demo

ImPlot3D::ShowDemoWindow

IMPLOT3D_API void ShowDemoWindow(bool* p_open = nullptr);

See it live: Help

Help

Shows the ImPlot3D demo window

Add implot3d_demo.cpp to your sources to use methods in this section

ImPlot3D::ShowAllDemos

IMPLOT3D_API void ShowAllDemos();

Shows all ImPlot3D demos, without enclosing window

ImPlot3D::ShowDemoWindow_MaybeDocked

IMPLOT3D_API void ShowDemoWindow_MaybeDocked(bool create_window, bool* p_open = NULL, ImGuiWindowFlags initial_extra_flags = 0, ImVec2 window_pos = ImVec2(0, 0), ImVec2 window_size = ImVec2(0, 0));

ImPlot3D::ShowStyleEditor

IMPLOT3D_API void ShowStyleEditor(ImPlot3DStyle* ref = nullptr);

Shows ImPlot3D style editor block (not a window)

ImPlot3D::ShowStyleSelector

IMPLOT3D_API bool ShowStyleSelector(const char* label);

See it live: Config

Config
Code from the demo
ImGui::ShowFontSelector("Font");
ImGui::ShowStyleSelector("ImGui Style");

Shows ImPlot3D style selector and returns True if selection is changed (not a window)

ImPlot3D::ShowColormapSelector

IMPLOT3D_API bool ShowColormapSelector(const char* label);

See it live: Config

Config
Code from the demo
ImGui::ShowFontSelector("Font");
ImGui::ShowStyleSelector("ImGui Style");
ImPlot3D::ShowStyleSelector("ImPlot3D Style");
ImPlot3D::ShowColormapSelector("ImPlot3D Colormap");

Shows ImPlot3D colormap selector and returns True if selection is changed (not a window)

ImPlot3D::ShowMetricsWindow

IMPLOT3D_API void ShowMetricsWindow(bool* p_popen = nullptr);

Shows ImPlot3D metrics/debug information window.

ImPlot3D::ShowAboutWindow

IMPLOT3D_API void ShowAboutWindow(bool* p_open = nullptr);

Shows ImPlot3D about window.

ImPlot3DPoint

ImPlot3DPoint (struct)

struct ImPlot3DPoint

ImPlot3DPoint: 3D vector to store points in 3D space

Member
double x,Coordinates
y,Coordinates
z;Coordinates
ImPlot3DPoint::ImPlot3DPoint
constexpr ImPlot3DPoint() : x(0.0), y(0.0), z(0.0);
constexpr ImPlot3DPoint(double _x, double _y, double _z) : x(_x), y(_y), z(_z);
ImPlot3DPoint::Dot
IMPLOT3D_API double Dot(const ImPlot3DPoint& rhs) const;

Dot product

ImPlot3DPoint::Cross
IMPLOT3D_API ImPlot3DPoint Cross(const ImPlot3DPoint& rhs) const;

Cross product

ImPlot3DPoint::Length
IMPLOT3D_API double Length() const;

Get vector length

ImPlot3DPoint::LengthSquared
IMPLOT3D_API double LengthSquared() const;

Get vector squared length

ImPlot3DPoint::Normalize
IMPLOT3D_API void Normalize();

Normalize to unit length

ImPlot3DPoint::Normalized
IMPLOT3D_API ImPlot3DPoint Normalized() const;

Return vector normalized to unit length

ImPlot3DPoint::IsNaN
IMPLOT3D_API bool IsNaN() const;

Check if the point is NaN

ImPlot3DRay

ImPlot3DRay (struct)

struct ImPlot3DRay

ImPlot3DRay: Represents a ray in 3D space with an origin and direction

Member
ImPlot3DPoint Origin;Ray origin point
ImPlot3DPoint Direction;Ray direction (not necessarily normalized)

ImPlot3DPlane

ImPlot3DPlane (struct)

struct ImPlot3DPlane

ImPlot3DPlane: Represents a plane in 3D space defined by a point and normal vector

Member
ImPlot3DPoint Point;A point on the plane
ImPlot3DPoint Normal;Plane normal vector

ImPlot3DBox

ImPlot3DBox (struct)

struct ImPlot3DBox

ImPlot3DBox: Axis-aligned bounding box in 3D space

Member
ImPlot3DPoint Min;Minimum corner of the box
ImPlot3DPoint Max;Maximum corner of the box
ImPlot3DBox::ImPlot3DBox
constexpr ImPlot3DBox() : Min(ImPlot3DPoint()), Max(ImPlot3DPoint());
constexpr ImPlot3DBox(const ImPlot3DPoint& min, const ImPlot3DPoint& max) : Min(min), Max(max);

Default constructor

ImPlot3DBox::Expand
IMPLOT3D_API void Expand(const ImPlot3DPoint& point);

Method to expand the box to include a point

ImPlot3DBox::Contains
IMPLOT3D_API bool Contains(const ImPlot3DPoint& point) const;

Method to check if a point is inside the box

ImPlot3DBox::ClipLineSegment
IMPLOT3D_API bool ClipLineSegment(const ImPlot3DPoint& p0, const ImPlot3DPoint& p1, ImPlot3DPoint& p0_clipped, ImPlot3DPoint& p1_clipped) const;

Method to clip a line segment against the box

ImPlot3DRange

ImPlot3DRange (struct)

struct ImPlot3DRange

ImPlot3DRange: Represents a 1D range with min and max values

Member
double Min;Minimum value
double Max;Maximum value
ImPlot3DRange::ImPlot3DRange
constexpr ImPlot3DRange() : Min(0.0), Max(0.0);
constexpr ImPlot3DRange(double min, double max) : Min(min), Max(max);
ImPlot3DRange::Expand
IMPLOT3D_API void Expand(double value);

Expand range to include value

ImPlot3DRange::Contains
IMPLOT3D_API bool Contains(double value) const;

Check if value is within range

ImPlot3DRange::Size
double Size() const;

(private API)

Get range size

ImPlot3DQuat

ImPlot3DQuat (struct)

struct ImPlot3DQuat

ImPlot3DQuat: Quaternion for representing 3D rotations

Member
double x,Quaternion components
y,Quaternion components
z,Quaternion components
w;Quaternion components
ImPlot3DQuat::ImPlot3DQuat
constexpr ImPlot3DQuat() : x(0.0), y(0.0), z(0.0), w(1.0);
constexpr ImPlot3DQuat(double _x, double _y, double _z, double _w) : x(_x), y(_y), z(_z), w(_w);
IMPLOT3D_API ImPlot3DQuat(double _angle, const ImPlot3DPoint& _axis);

Construct quaternion from angle-axis representation (angle in radians)

ImPlot3DQuat::FromTwoVectors
IMPLOT3D_API static ImPlot3DQuat FromTwoVectors(const ImPlot3DPoint& v0, const ImPlot3DPoint& v1);

Create quaternion that rotates from v0 to v1

ImPlot3DQuat::FromElAz
IMPLOT3D_API static ImPlot3DQuat FromElAz(double elevation, double azimuth);

Create quaternion from elevation and azimuth angles (in radians)

ImPlot3DQuat::Length
IMPLOT3D_API double Length() const;

Get quaternion length

ImPlot3DQuat::Normalized
IMPLOT3D_API ImPlot3DQuat Normalized() const;

Get normalized quaternion

ImPlot3DQuat::Conjugate
IMPLOT3D_API ImPlot3DQuat Conjugate() const;

Conjugate of the quaternion

ImPlot3DQuat::Inverse
IMPLOT3D_API ImPlot3DQuat Inverse() const;

Inverse of the quaternion

ImPlot3DQuat::Normalize
IMPLOT3D_API ImPlot3DQuat& Normalize();

Normalize the quaternion in place

ImPlot3DQuat::Slerp
IMPLOT3D_API static ImPlot3DQuat Slerp(const ImPlot3DQuat& q1, const ImPlot3DQuat& q2, double t);

Spherical linear interpolation between two quaternions (t in [0,1])

ImPlot3DQuat::Dot
IMPLOT3D_API double Dot(const ImPlot3DQuat& rhs) const;

Get quaternion dot product

ImPlot3DStyle

ImPlot3DStyle (struct)

struct ImPlot3DStyle

See it live: Custom › Custom Styles

Custom › Custom Styles
Code from the demo
ImPlot3DStyle backup = ImPlot3D::GetStyle();

(has support for copy.copy)

Member
float LineWeight;Line weight in pixels
int Marker;Default marker type (ImPlot3DMarker_None)
float MarkerSize;Marker size in pixels (roughly the marker’s “radius”)
float FillAlpha;Alpha modifier applied to plot fills
ImVec2 PlotDefaultSize;Default size used when ImVec2(0,0) is passed to BeginPlot
ImVec2 PlotMinSize;Minimum size plot frame can be when shrunk
ImVec2 PlotPadding;Padding between widget frame and plot area
ImVec2 LabelPadding;Padding between axes labels, tick labels, and plot edge
float ViewScaleFactor;Scale factor for 3D view
ImVec2 LegendPadding;Legend padding from plot edges
ImVec2 LegendInnerPadding;Legend inner padding from legend edges
ImVec2 LegendSpacing;Spacing between legend entries
ImPlot3DColormap Colormap;The current colormap (ImPlot3DColormap_ enum or index from AddColormap)
ImPlot3DStyle::GetColor
inline ImVec4 GetColor(ImPlot3DCol idx) const;

(private API)

ImPlot3DStyle::SetColor
inline void SetColor(ImPlot3DCol idx, const ImVec4& col);

(private API)

ImPlot3DStyle::ImPlot3DStyle
IMPLOT3D_API ImPlot3DStyle();
ImPlot3DStyle(const ImPlot3DStyle& other) = default;

Constructor