I can't seem to get my dates to work on Bokeh, plot is messed up

70 views Asked by At

So I'm trying to learn Bokeh, using Jupyter notebooks. When I use this code it works great: ''''

    X=tesla['Date']
Y=tesla['Close']
output_file('time.html') #output file, have to import
fig=figure(width=2000, height=2000,title='Tesla Stock', toolbar_location="below",x_axis_type="datetime") #create figure object
fig.title.text="Tesla Stock"
fig.title.text_color="Gray"
fig.title.text_font="times"
fig.title.text_font_style="bold"
fig.xaxis.minor_tick_line_color='Red'
fig.yaxis.minor_tick_line_color='Blue'
fig.xaxis.axis_label="Date"
fig.yaxis.axis_label="Close"  
fig.line(X,Y) #fig (see import above), line graph and variables
show(fig)

''''' The graphic I get looks like this: My messed chart

what am I doing wrong?

0

There are 0 answers