I am trying to create a bar graph using the matplot library but I cant figure out what the arguments are for the function.
The documentation says bar(left, height), but I don’t know how to put in my data [which is a list of numbers called x] in here.
It tells me that the height should be a scalar when I put it as a number 0.5 or 1, and doesn’t show me the error if the height is a list.
A simple thing you can do:
leftis the left ends of the bars. You’re telling it where to place the bars on the horizontal axis. Here’s something you can play around with until you get it: