Recently I start working on data visualization with bokeh library. my task is to take a CSV data an turn it to graph via python. i'm facing some issues here. below is my environment structure and problem.
Environment
- python = 2.7.14
- bokeh = 0.12.13
problem Description
I need to take a data from CSV file named by "data.csv". my file structure is look like: Id, upbyte, downbyte,time "timestamp". I need assistance to drow the data with figure.multi_line. i toke my chance but still the data not coming like i wanted.
My_Code:
def run_graph():
df = pandas.read_csv("/Users/path/fetch_data.csv",parse_dates["StatTime"])
p = Figure(width=500, height=250, x_axis_type="datetime", responsive=True,
tools="pan, box_zoom, wheel_zoom, save, reset",logo =None,
title="Graph:", x_axis_label="Time Frame", y_axis_label="Traffic")
timeFrame = df["Time"]
upbyte = df["up"]
downbyte = df["Down"]
protocolname = df["Name"]
p.multi_line(x = [timeFrame, upbyte], y = [timeFrame, downbyte], color=['Red', 'green'], line_width=1)
p.circle(x = [timeFrame, upbyte], y = [timeFrame, downbyte], fill_color='orange', size=6)
output_file("/Users/path/graph.html", title="Reports")
show(p)
run_graph()
Error
The script error is: Error:TypeError: multiline() takes exactly 3 arguments (1 given)
i hope my question was clear for everyone. If not please let me know to provide you with more details. Thank you in advance Gent's.


