Skip to content

Commit

Permalink
issues/81: add stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Feb 16, 2023
1 parent fb8fa7b commit 5be6292
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion bindings/imgui_bundle/implot/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Python bindings for https://github.com/epezent/implot
"""

from typing import Any, Optional, Tuple
from typing import Any, Optional, Tuple, List
import numpy as np
import enum
from . import internal as internal
Expand Down Expand Up @@ -2442,3 +2442,26 @@ def show_demo_window(p_open: Optional[bool] = None) -> Optional[bool]:

# </litgen_stub>
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE END !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


###############################################################################
# MANUAL BINDINGS BELOW
###############################################################################

# Sets an axis' ticks and optionally the labels for the next plot. To keep the default ticks, set #keep_default=true.
# IMPLOT_API void SetupAxisTicks(ImAxis axis, const double* values, int n_ticks, const char* const labels[]=NULL, bool keep_default=false); /* original C++ signature */
def setup_axis_ticks(axis: ImAxis, v_min: float, v_max: float, n_ticks: int, labels: List[str], keep_default: bool = False):
pass


# Plots a 2D heatmap chart. Values are expected to be in row-major order by default. 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 NULL for no labels.
# IMPLOT_TMP void PlotHeatmap(const char* label_id, const T* values, int rows, int cols, double scale_min=0, double scale_max=0, const char* label_fmt="%.1f", const ImPlotPoint& bounds_min=ImPlotPoint(0,0), const ImPlotPoint& bounds_max=ImPlotPoint(1,1), ImPlotHeatmapFlags flags=0); /* original C++ signature */
def plot_heatmap(label_id: str,
values: np.ndarray,
scale_min:float = 0.,
scale_max:float=0.,
label_fmt:str="%.1f",
bounds_min:Point = Point(0,0),
bounds_max:Point = Point(1,1),
flags:HeatmapFlags=0):
pass

0 comments on commit 5be6292

Please sign in to comment.