epezent / implot

Immediate Mode Plotting
MIT License
4.66k stars 520 forks source link

Get plot item visibility status #340

Open errollw opened 2 years ago

errollw commented 2 years ago

First off, thank you for the amazing library!

Is there any way to access plot item visibility? I am enjoying the cumulative histogram, and have added some vertical lines (with PlotVLines) at e.g. the 50th, 75th, ... percentiles.

image

But, when I hide one of these vertical lines, I would also like to hide to corresponding text, which I add with PlotText. If I could access the item->Show value, I would just skip over adding this vertical text.

image

I can't figure out a way to get access to the visibility status of that vertical line. Is there any way to do this currently?

Thank you! 🙇

epezent commented 2 years ago

There is a PR adding this, but I have not had time to consider how the API for "previous items" needs function.

https://github.com/epezent/implot/pull/295

ssteinbach commented 1 year ago

Wanted to poke this thread. I'm hitting the same issue - I'd love to be able to hide PlotText for plots that are hidden in the legend. And agree, this library is great, thanks!

Dvad commented 1 year ago

I have the got the same need recently.

TheMiles commented 10 months ago

Hi, agreeing with the others. This is a great library and very helpful, thank you!

And I'm also interested in this feature. In my case I have the need to recreate the context from time to time. And then the ImPlotCond_Once information is lost, meaning something visible is hidden again.