Python Forum

Full Version: Python code unable to show Bokeh line chart
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

Would appreciate your help on why my Bokeh line chart doesnt show the line graph.

Thanks

# output to static HTML file
output_notebook()
x = pull_hdbrpi.iloc[:,0]
y = pull_hdbrpi.iloc[:,1]


# create a new plot with a title and axis labels
p = figure(title="HDB Resale Price Index Linechart", x_axis_label='Quarter', y_axis_label='Index')

# add a line renderer with legend and line thickness
p.line(x, y, legend="Temp.", line_width=2)

# show the results
show(p)
please post large enough code snippet that it can be run.
Hi Larz60+,

Thanks for your help, my friend managed to solve it as my data was not in int format thats why the line didnt show up.