Issue
Probably something really simple.
I use an example to plot a Candlestick chart using plotly, but the plot never show up!?
This is the code from https://plot.ly/python/candlestick-charts/
import plotly.graph_objects as go
import pandas as pd
from datetime import datetime
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = go.Figure(data=[go.Candlestick(x=df['Date'],
open=df['AAPL.Open'],
high=df['AAPL.High'],
low=df['AAPL.Low'],
close=df['AAPL.Close'])])
fig.show()
I'm using last updated python and spyder4 on anaconda. I usually use matplotlib without problem.
Solution
It is an issue already considered in the plotly community:
import plotly.graph_objects as go
from plotly.offline import iplot
import pandas as pd
from datetime import datetime
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
fig = go.Figure(data=[go.Candlestick(x=df['Date'],
open=df['AAPL.Open'],
high=df['AAPL.High'],
low=df['AAPL.Low'],
close=df['AAPL.Close'])])
iplot(fig)
Answered By - sentence
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.