Python Forum

Full Version: Help with plot, how to show ranking with boxes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: data-visualization-gelman-1024x768.jpg]

Hi! I am quite new to Python and I would like to reproduce the graph of the picture and, if possible, divide the boxes into three categories. I need the size of the boxes to be proportional to a total value and have them next to each other.

I have tried with plt.scatter(), changing the shape to a square and then plotting each squared with an x and y value, but I would like to find a more general code, such that the boxes stay in contact even if I change their size.

Any input is appreciated!
Look at tkinter as a possibility, it should be possible as there are basic shapes, specifically, look at canvas widget.
Please:
  • make an attempt:
  • show your code
  • show any error messages complete and unaltered
  • explain where you are having trouble
  • Do all above, and we will be glad to help