Search code examples
pythonpandasaltair

Plotting 1:8 attributes on altair


How to plot graph for 1:8 attributes using altair? Here is the link to the dataset. I want to plot an interactive mark_point() graph for various attributes like fresh, frozen, etc, considering the region and channel as filters. The x-axis should have attributes, and the y-axis will have the count.

The interaction is based on region and channel to show the values of user buying from distributor.

I am not able to plot the 8 attributes on a single graph. I tried transforming the df into a dictionary and then using the same to plot the graph. but unsuccessful.


Solution

  • I guess this is the limitation of altair. you cannot club all the attributes together. You will need matplotlib for doing so. Hope this helps. !!