Python Forum
Python code unable to show Bokeh line chart
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python code unable to show Bokeh line chart
#1
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)
Reply
#2
please post large enough code snippet that it can be run.
Reply
#3
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Some line code explanation Chrilo06 3 2,061 Feb-24-2022, 06:24 PM
Last Post: deanhystad
  Unable to unpack at line 184 Nitil 4 2,866 May-01-2021, 02:54 PM
Last Post: Nitil
  I have homework that I've made no effort to show any code that I'm stuck on Ronaldinho 1 2,371 May-30-2019, 07:18 PM
Last Post: nilamo
  How to repeat input line of code until condition is met Reta 2 3,362 May-14-2019, 10:06 PM
Last Post: nilamo
  Python UI - Getting Label to show to left of QLineEdit ijosefson 1 2,868 Nov-11-2017, 01:54 AM
Last Post: ijosefson
  matplotlib and line chart with shaded area metalray 10 21,544 Apr-11-2017, 08:54 AM
Last Post: metalray

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020