DBN modified & Demo to plot bar figure