Open Sologala opened 6 months ago
I can directly modify plotitem's member variable to achive that, but it needs to include implot_internal.h
.
Is there some elegant way to do this?
if (first_draw) {
first_draw = false;
ImPlotContext *ctx = ImPlot::GetCurrentContext();
ImPlotPlot *plot = ctx->CurrentPlot;
const int num_items = plot->Items.GetLegendCount();
for (int i = 0; i < num_items; ++i) {
ImPlotItem *item = plot->Items.GetLegendItem(i);
item->Show = false;
}
}
``
Am also interested in achieving this.
I will plot multi lines in one frame, but do not want show all of them in beginning. Is there some way to disable all lines in legend?