mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-02 19:16:49 +08:00
PlotHistogram: add comments. (#9372)
This commit is contained in:
+2
-3
@@ -8869,9 +8869,7 @@ bool ImGui::ListBox(const char* label, int* current_item, const char* (*getter)(
|
|||||||
// - PlotHistogram()
|
// - PlotHistogram()
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// Plot/Graph widgets are not very good.
|
// Plot/Graph widgets are not very good.
|
||||||
// Consider writing your own, or using a third-party one, see:
|
// Consider using ImPlot (https://github.com/epezent/implot) which is much better!
|
||||||
// - ImPlot https://github.com/epezent/implot
|
|
||||||
// - others https://github.com/ocornut/imgui/wiki/Useful-Extensions
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
int ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, const ImVec2& size_arg)
|
int ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, const ImVec2& size_arg)
|
||||||
@@ -9018,6 +9016,7 @@ void ImGui::PlotLines(const char* label, float (*values_getter)(void* data, int
|
|||||||
PlotEx(ImGuiPlotType_Lines, label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
|
PlotEx(ImGuiPlotType_Lines, label, values_getter, data, values_count, values_offset, overlay_text, scale_min, scale_max, graph_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Plot Histogram (the data provided _is_ histogram data. it doesn't compute the histogram of your data)
|
||||||
void ImGui::PlotHistogram(const char* label, const float* values, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
|
void ImGui::PlotHistogram(const char* label, const float* values, int values_count, int values_offset, const char* overlay_text, float scale_min, float scale_max, ImVec2 graph_size, int stride)
|
||||||
{
|
{
|
||||||
ImGuiPlotArrayGetterData data(values, stride);
|
ImGuiPlotArrayGetterData data(values, stride);
|
||||||
|
|||||||
Reference in New Issue
Block a user