I am trying to plot a simple 2 dimensional Bar Graph for two lists in python.
(note that max of this list is 4)
I want to plot this list and its corresponding index using Plotlib.
My code is this
import numpy as np
import matplotlib.pyplot as pl
bitpos = np.arange(len(sumlist))
pl.bar(bitpos,sumlist, align='center', alpha=0.5)
If you want to add some space to the top of your plot, you can add something like:
to the bottom of your current script.This changes the y limits of your plot to 0 and 5 (currently they are 0 and 4).