i use example to create graph with below
-
but it did not show line graph
-
how to point to graph can create a text file or csv file for feature, after point the data in graph, it
create a vertical line in graph and mark 1 in data ,
for example 100 data , third extra column [0…0] 100 zero intially , after point the second column one of data
it change one of zero in the array of 100 zeros corresponding to the position of x axis
import plotly.plotly as py
import plotly.graph_objs as go
import plotly
import numpy as np
import pandas as pd
import plotly.figure_factory as FF
import plotly.graph_objs as go
df = pd.read_csv(‘hello.csv’)
sample_data_table = FF.create_table(df.head())
fig = go.FigureWidget([go.Scatter(x = df[‘Date’], y = df[‘Close’], mode=‘markers’)])
scatter = fig.data[0]
fig.layout.hovermode = ‘closest’
def update_point(trace, points, selector):
c = list(scatter.marker.color)
s = list(scatter.marker.size)
for i in points.point_inds:
c[i] = ‘#bae2be’
s[i] = 20
scatter.marker.color = c
scatter.marker.size = s
scatter.on_click(update_point)
#trace = go.Scatter(x = df[‘Date’], y = df[‘Close’], mode=‘markers’)
#data = [trace]
py.iplot(fig, filename = ‘basic-line’, auto_open=True)