implot icon indicating copy to clipboard operation
implot copied to clipboard

Get plot item visibility status

Open errollw opened this issue 3 years ago • 5 comments

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! 🙇

errollw avatar Mar 21 '22 15:03 errollw

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

epezent avatar May 08 '22 15:05 epezent

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!

ssteinbach avatar Jul 09 '23 04:07 ssteinbach

I have the got the same need recently.

Dvad avatar Jul 31 '23 04:07 Dvad

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.

TheMiles avatar Oct 31 '23 09:10 TheMiles