✊🏿 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!

Add Boxplot figure according with number of parameters

Hello everyone:
I have a list of fruits: fruits = [‘banana’, ‘apple’, ‘orange’, ‘watermelon’, ‘melon’]
And I have a multi-dropdown where you select which fruit distribution you want to see
I would like to create a customizable boxplot figure that is able to show the fruits selected by receiving the name as an input of a callback: so if in the dropdown there is only banana, see only the banana boxplot, or if there are banana or apple see both…etc

Is there a way to do it? Because right now I have only managed to visualise all of them at once

Thank you so much