Python - Проблема с построением графика на ноутбуке jupyter - PullRequest
0 голосов
/ 14 июля 2020

Я строю график на jupyter notebook. Фактический график должен выглядеть так. enter image description here

However, I am getting this. Please how can i correct this. enter image description here

Please see below code:

# Setting layout for our plot
layout = go.Layout(
    title='Stock Prices of Tesla',
    xaxis=dict(
        title='Date',
        titlefont=dict(
            family='Courier New, monospace',
            size=18,
            color='#7f7f7f'
        )
    ),
    yaxis=dict(
        title='Price',
        titlefont=dict(
            family='Courier New, monospace',
            size=18,
            color='#7f7f7f'
        )
    )
)

tesla_data = [{'x': tesla['Date'], 'y': tesla['Close']}]
plot = go.Figure(data=tesla_data, layout=layout)
#plot(plot) #plotting offline
iplot(plot)

Please see snapshot of my data введите описание изображения здесь

...