We are trying to plot a circle graph from a simple CSV file with two columns using Bokeh for data visualisation and Panda to read the CSV. Following is our CSV file data where we are planning to plot graph Label X-axis and Average Y-axis. However its plotting empty graph.
Following is our python script
from bokeh.plotting import figure, output_file, show
import pandas as pd
from bokeh.models import DatetimeTickFormatter, ColumnDataSource
from bokeh.models.tools import HoverTool
output_file('columndatasource_example.html')
df = pd.read_csv(r"E:/MySpace/pythonTest/aggregate3.csv")
sample= df.sample(5)
source = ColumnDataSource(sample)
#print(df.columns.tolist())
p = figure()
p.circle(x='Label', y='Average',
source=source,
size=5, color='green')
p.title.text = 'BPM Load test results'
p.xaxis.axis_label = 'Request name'
p.yaxis.axis_label = 'Response time in miliseconds'
hover = HoverTool()
hover.tooltips=[
('Request Name', '@Label'),
('Response Time', '@Average'),
('Throughput', '@Throughput')
]
p.add_tools(hover)
show(p)