✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Automatic Box Select/Highlighting

Hi there,

I was wondering if there was a way to highlight a region on a figure using a box select programmatically. In other words, instead of the user using the tool to highlight a region on the plot, I want the app to automatically highlight a region (e.g. a region where all values are above X or positive) based on the user’s input.

I do not necessarily have to be the box select tool, it’s simply where I got the inspiration from. I would like to create the same effect.

I did a brief search and couldn’t find anything, it could be that I am using the wrong keywords…

Thanks!

Have you looked at shapes? Basically, you just layer the shape over the area that you want to highlight. It is just like any other trace so you could draw it programmatically too. For extra clarity you could also label it using annotations.

I haven’t. That’s exactly what I had in mind. Thanks!