0

What I want to achieve is 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 matplotli. Is matplotlib is capable of doing that? Any link or related documentation will be helpful. Thanks.

Ankur
  • 197
  • 2
  • 17

1 Answers1

6

There are several ways of producing a dropdown field in matplotlib.

(a) Jupyter notebook

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.

(b) Matplotlib within PyQt.

You can embed matplotlib into PyQt and use the PyQt widgets to obtain a drop down field. Here is a solution for that.

(c) Matplotlib widgets

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.

Community
  • 1
  • 1
ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712