Reputation: 307
I want to create a chart using python where I could be able to see data related to different data points. For example I want to compare 5 different qualities (data points) of 10 different products.
Now is it possible to select these data points one at a time from a drop down list and show it's data for all 10 products?
Till now I have only created simple comparison charts using matplotlib
. Is matplotlib
is capable of doing that? Any link or related documentation will be helpful. Thanks.
Upvotes: 0
Views: 4349
Reputation: 339170
There are several ways of producing a dropdown field in matplotlib.
In order to get a dropdown field in a Jupyter notebook, you can use the ipywidgets.interact()
command. I have already provided an answer on how to use that.
You can embed matplotlib into PyQt and use the PyQt widgets to obtain a drop down field. Here is a solution for that.
Matplotlib provides some interactive widgets out of the box. Unfortunately it does not provide a dropdown field. But if requirements are not too strict, one could use a slider to accomplish the effect of chosing different datasets. Find an example here.
Upvotes: 7