|
LuaSTG-x Core API
|
Classes | |
| class | ImPlotInputMap |
| class | ImPlotLimits |
| class | ImPlotPoint |
| class | ImPlotRange |
| class | ImPlotStyle |
Public Member Functions | |
| static function | beginPlot (local title_id, local x_label, local y_label, local size, local flags, local x_flags, local y_flags, local y2_flags, local y3_flags) |
| static function | endPlot () |
| static function | getColormapColor (local index) |
| static function | getColormapSize () |
| static function | getInputMap () |
| static function | getPlotLimits () |
| static function | getPlotMousePos () |
| static function | getPlotPos () |
| static function | getPlotQuery () |
| static function | getPlotSize () |
| static function | getStyle () |
| static function | isPlotHovered () |
| static function | isPlotQueried () |
| static function | lerpColormap (local t) |
| static function | pixelsToPlot (local pix, local y_axis) |
| static function | plotBars (local label_id, local values, local count, local width, local shift, local offset) |
| static function | plotBarsH (local label_id, local values, local count, local height, local shift, local offset) |
| static function | plotDigital (local label_id, local xs, local ys, local count, local offset) |
| static function | plotErrorBars (local label_id, local xs, local ys, local err, local count, local offset) |
| static function | plotErrorBars (local label_id, local xs, local ys, local neg, local pos, local count, local offset) |
| static function | plotErrorBarsH (local label_id, local xs, local ys, local err, local count, local offset) |
| static function | plotErrorBarsH (local label_id, local xs, local ys, local neg, local pos, local count, local offset) |
| static function | plotHeatmap (local label_id, local values, local rows, local cols, local scale_min, local scale_max, local label_fmt, local bounds_min, local bounds_max) |
| static function | plotLine (local label_id, local data, local count, local offset) |
| static function | plotLine (local label_id, local values, local count, local offset) |
| static function | plotLine (local label_id, local xs, local ys, local count, local offset) |
| static function | plotPieChart (local label_ids, local values, local count, local x, local y, local radius, local normalize, local label_fmt, local angle0) |
| static function | plotScatter (local label_id, local data, local count, local offset) |
| static function | plotScatter (local label_id, local values, local count, local offset) |
| static function | plotScatter (local label_id, local xs, local ys, local count, local offset) |
| static function | plotShaded (local label_id, local xs, local ys1, local ys2, local count, local offset) |
| static function | plotText (local text, local x, local y, local vertical, local pixel_offset) |
| static function | plotToPixels (local plt, local y_axis) |
| static function | popPlotClipRect () |
| static function | popStyleColor () |
| static function | popStyleVar () |
| static function | pushPlotClipRect () |
| static function | pushStyleColor (local idx, local col) |
| static function | pushStyleVar (local idx, local val) |
| static function | setColormap (local colormap, local samples) |
| static function | setColormap (local colors) |
| static function | setNextPlotLimits (local x_min, local x_max, local y_min, local y_max, local cond) |
| static function | setNextPlotLimitsX (local x_min, local x_max, local cond) |
| static function | setNextPlotLimitsY (local y_min, local y_max, local cond, local y_axis) |
| static function | setNextPlotTicksX (local values, local n_ticks, local labels, local show_default) |
| static function | setNextPlotTicksX (local x_min, local x_max, local n_ticks, local labels, local show_default) |
| static function | setNextPlotTicksY (local values, local n_ticks, local labels, local show_default, local y_axis) |
| static function | setNextPlotTicksY (local x_min, local x_max, local n_ticks, local labels, local show_default, local y_axis) |
| static function | setPlotYAxis (local y_axis) |
| static function | showColormapScale (local scale_min, local scale_max, local height) |
| static function | showDemoWindow (local open) |
| static function beginPlot | ( | local | title_id, |
| local | x_label, | ||
| local | y_label, | ||
| local | size, | ||
| local | flags, | ||
| local | x_flags, | ||
| local | y_flags, | ||
| local | y2_flags, | ||
| local | y3_flags | ||
| ) |
Starts a 2D plotting context. If this function returns true, EndPlot() must
be called, e.g. "if (BeginPlot(...)) { ... EndPlot(); }"". #title_id must
be unique. If you need to avoid ID collisions or don't want to display a
title in the plot, use double hashes (e.g. "MyPlot##Hidden"). If #x_label
and/or #y_label are provided, axes labels will be displayed.
| title_id | string |
| x_label | string @optional |
| y_label | string @optional |
| size | ImVec2 @optional |
| flags | number @optional |
| x_flags | number @optional |
| y_flags | number @optional |
| y2_flags | number @optional |
| y3_flags | number @optional |
| static function endPlot | ( | ) |
Returns a color from the Color map given an index >= 0 (modulo will be performed)
| index | number |
| static function getColormapSize | ( | ) |
Returns the size of the current colormap.
| static function getInputMap | ( | ) |
Allows changing how keyboard/mouse interaction works.
| static function getPlotLimits | ( | ) |
Returns the current or most recent plot axis range. A negative y_axis uses the current value of SetPlotYAxis (0 initially).
| static function getPlotMousePos | ( | ) |
Returns the mouse position in x,y coordinates of the current or most recent plot. A negative y_axis uses the current value of SetPlotYAxis (0 initially).
| static function getPlotQuery | ( | ) |
Returns the current or most recent plot query bounds.
| static function getStyle | ( | ) |
Provides access to plot style structure for permanant modifications to colors, sizes, etc.
| static function isPlotHovered | ( | ) |
Returns true if the plot area in the current or most recent plot is hovered.
| static function isPlotQueried | ( | ) |
Returns true if the current or most recent plot is being queried.
Linearly interpolates a color from the current colormap given t between 0 and 1.
| t | number |
Convert pixels to a position in the current plot's coordinate system. A negative y_axis uses the current value of SetPlotYAxis (0 initially).
| pix | ImVec2 |
| y_axis | number |
| static function plotBars | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | count, | ||
| local | width, | ||
| local | offset | ||
| ) |
Plots a vertical bar graph.
| label_id | string |
| values | number[] |
| count | number |
| width | number @optional |
| shift | number @optional |
| offset | number @optional |
Plots a vertical bar graph.
| label_id | string |
| xs | number[] |
| ys | number[] |
| count | number |
| width | number |
| offset | number @optional |
| static function plotBarsH | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | count, | ||
| local | height, | ||
| local | offset | ||
| ) |
Plots a horizontal bar graph.
| label_id | string |
| values | number |
| count | number |
| height | number @optional |
| shift | number @optional |
| offset | number @optional |
Plots a horizontal bar graph.
| label_id | string |
| xs | number |
| ys | number |
| count | number |
| height | number |
| offset | number @optional |
Plots digital data.
| label_id | string |
| xs | number[] |
| ys | number[] |
| count | number |
| offset | number @optional |
| static function plotErrorBars | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | err, | ||
| local | count, | ||
| local | offset | ||
| ) |
Plots vertical error bar. The label_id should match the label_id of the associated line or bar plot.
| label_id | string |
| xs | number |
| ys | number |
| err | number |
| count | number |
| offset | number @optional |
| static function plotErrorBars | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | neg, | ||
| local | pos, | ||
| local | count, | ||
| local | offset | ||
| ) |
Plots vertical error bar. The label_id should match the label_id of the associated line or bar plot.
| label_id | string |
| xs | number |
| ys | number |
| neg | number |
| pos | number |
| count | number |
| offset | number @optional |
| static function plotErrorBarsH | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | err, | ||
| local | count, | ||
| local | offset | ||
| ) |
Plots horizontal error bars. The label_id should match the label_id of the associated line or bar plot.
| label_id | string |
| xs | number |
| ys | number |
| err | number |
| count | number |
| offset | number @optional |
| static function plotErrorBarsH | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | neg, | ||
| local | pos, | ||
| local | count, | ||
| local | offset | ||
| ) |
Plots horizontal error bars. The label_id should match the label_id of the associated line or bar plot.
| label_id | string |
| xs | number |
| ys | number |
| neg | number |
| pos | number |
| count | number |
| offset | number @optional |
| static function plotHeatmap | ( | local | label_id, |
| local | values, | ||
| local | rows, | ||
| local | cols, | ||
| local | scale_min, | ||
| local | scale_max, | ||
| local | label_fmt, | ||
| local | bounds_min, | ||
| local | bounds_max | ||
| ) |
Plots a 2D heatmap chart. Values are expected to be in row-major order. label_fmt can be set to NULL for no labels.
| label_id | string |
| values | number |
| rows | number |
| cols | number |
| scale_min | number |
| scale_max | number |
| label_fmt | string @optional |
| bounds_min | implot.ImPlotPoint @optional |
| bounds_max | implot.ImPlotPoint @optional |
Plots a standard 2D line plot.
| label_id | string |
| data | ImVec2[] |
| count | number |
| offset | number @optional |
Plots a standard 2D line plot.
| label_id | string |
| values | number[] |
| count | number |
| offset | number @optional |
Plots a standard 2D line plot.
| label_id | string |
| data | ImVec2[] |
| count | number |
| offset | number @optional |
Plots a standard 2D line plot.
| label_id | string |
| xs | number[] |
| ys | number[] |
| count | number |
| offset | number @optional |
| static function plotPieChart | ( | local | label_ids, |
| local | values, | ||
| local | count, | ||
| local | x, | ||
| local | y, | ||
| local | radius, | ||
| local | normalize, | ||
| local | label_fmt, | ||
| local | angle0 | ||
| ) |
Plots a pie chart. If the sum of values > 1 or normalize is true, each value will be normalized. Center and radius are in plot coordinates.
| label_ids | string[] |
| values | number[] |
| count | number |
| x | number |
| y | number |
| radius | number |
| normalize | boolean @optional |
| label_fmt | string @optional |
| angle0 | number @optional |
Plots a standard 2D scatter plot.
| label_id | string |
| data | ImVec2[] |
| count | number |
| offset | number @optional |
Plots a standard 2D scatter plot.
| label_id | string |
| values | number[] |
| count | number |
| offset | number @optional |
Plots a standard 2D scatter plot.
| label_id | string |
| data | ImVec2[] |
| count | number |
| offset | number @optional |
Plots a standard 2D scatter plot.
| label_id | string |
| xs | number[] |
| ys | number[] |
| count | number |
| offset | number @optional |
| static function plotShaded | ( | local | label_id, |
| local | xs, | ||
| local | ys, | ||
| local | count, | ||
| local | y_ret, | ||
| local | offset | ||
| ) |
Plots a shaded (filled) region between two lines, or a line and a horizontal reference.
| label_id | string |
| xs | number[] |
| ys1 | number[] |
| ys2 | number[] |
| count | number |
| offset | number @optional |
Plots a shaded (filled) region between two lines, or a line and a horizontal reference.
| label_id | string |
| xs | number[] |
| ys | number[] |
| count | number |
| y_ret | number @optional |
| offset | number @optional |
Plots a text label at point x,y.
| text | string |
| x | number |
| y | number |
| vertical | boolean |
| pixel_offset | ImVec2 |
Convert a position in the current plot's coordinate system to pixels. A negative y_axis uses the current value of SetPlotYAxis (0 initially).
| plt | implot.ImPlotPoint |
| y_axis | number |
| static function popPlotClipRect | ( | ) |
Pop plot clip rect.
| static function popStyleColor | ( | ) |
Undo temporary color modification.
| static function popStyleVar | ( | ) |
Undo temporary style modification.
| static function pushPlotClipRect | ( | ) |
Push clip rect for rendering to current plot area.
Temporarily modify a plot color. Don't forget to call PopStyleColor!
| idx | number |
| col | number|ImVec4 |
Temporarily modify a style variable. Don't forget to call PopStyleVar!
| idx | number |
| val | number |
Switch to one of the built-in colormaps. If samples is greater than 1, the map will be linearly resampled.
| colormap | number |
| samples | number @optional |
| static function setNextPlotLimits | ( | local | x_min, |
| local | x_max, | ||
| local | y_min, | ||
| local | y_max, | ||
| local | cond | ||
| ) |
Set the axes range limits of the next plot. Call right before BeginPlot(). If ImGuiCond_Always is used, the axes limits will be locked.
| x_min | number |
| x_max | number |
| y_min | number |
| y_max | number |
| cond | number |
Set the X axis range limits of the next plot. Call right before BeginPlot(). If ImGuiCond_Always is used, the X axis limits will be locked.
| x_min | number |
| x_max | number |
| cond | number |
Set the Y axis range limits of the next plot. Call right before BeginPlot(). If ImGuiCond_Always is used, the Y axis limits will be locked.
| y_min | number |
| y_max | number |
| cond | number |
| y_axis | number |
Set the X axis ticks and optionally the labels for the next plot.
| values | number[] |
| n_ticks | number |
| labels | string[] @optional |
| show_default | boolean @optional |
| static function setNextPlotTicksX | ( | local | x_min, |
| local | x_max, | ||
| local | n_ticks, | ||
| local | labels, | ||
| local | show_default | ||
| ) |
Set the X axis ticks and optionally the labels for the next plot.
| x_min | number |
| x_max | number |
| n_ticks | number |
| labels | string @optional |
| show_default | boolean @optional |
| static function setNextPlotTicksY | ( | local | values, |
| local | n_ticks, | ||
| local | labels, | ||
| local | show_default, | ||
| local | y_axis | ||
| ) |
Set the Y axis ticks and optionally the labels for the next plot.
| values | number[] |
| n_ticks | number |
| labels | string[] @optional |
| show_default | boolean @optional |
| y_axis | number @optional |
| static function setNextPlotTicksY | ( | local | x_min, |
| local | x_max, | ||
| local | n_ticks, | ||
| local | labels, | ||
| local | show_default, | ||
| local | y_axis | ||
| ) |
Set the Y axis ticks and optionally the labels for the next plot.
| x_min | number |
| x_max | number |
| n_ticks | number |
| labels | string @optional |
| show_default | boolean @optional |
| y_axis | number @optional |
Select which Y axis will be used for subsequent plot elements. The default is '0', or the first (left) Y axis.
| y_axis | number |
Renders a vertical color scale using the current color map
| scale_min | number |
| scale_max | number |
| height | number |