Home > database >  Getting bar plot from dataframe
Getting bar plot from dataframe

Time:09-14

I have a dataframe df like below: enter image description here

Now I like the bar plot of the first column i.e. year against the columns A, B, C, D.

from bokeh.io import output_file, show
from bokeh.plotting import figure
from bokeh.palettes import Spectral6
from bokeh.models import ColumnDataSource
from bokeh.transform import factor_cmap
output_file("bar_charts.html")

There would be three different bar plots, considering each row (Year vs numerical columns).

What parameters to put in these two lines of code so that i can accomplish it:

p = figure(x_range=??, height=350, title="Count")    
p.vbar(x=?, top=?, width=0.9)
show(p)

CodePudding user response:

This is nearly a 1 by 1 copy of the simple bar plot with bokeh

  • Related