
I am trying to plot a big graph. I want to plot a range in X_axis. Below you can find what I am trying to do, which I made using matplotlib.
import matplotlib.pyplot as plt
import csv
with open('test.csv','r') as csvfile :
rows = list(csv.reader(csvfile, delimiter=','))[1:]
rows.sort(key = lambda x: int(x[1]))
for row in rows:
start, end, data = int(row[2]), int(row[3]), int(row[1])
x = [start, end]
y = [data, data]
plt.plot(x, y, color = 'b', marker='o')
plt.xlabel('time(milliseconds)')
plt.ylabel('Amount of Data(bytes)')
plt.title('VFS layer Read only graph')
plt.grid(True)
plt.savefig('VR.png')
plt.show()

This is the image result for the plot using matplotlib. I want to do the same using Bokeh ColumnDataSource.
df = pd.read_csv('test.csv')
data = ColumnDataSource(data={
'x':df['x'],
**'y':df['y1']+df['y2'],** # I could not give range in here
})
plot1 = figure()
plot1.cross(x='x',y='y',source=data, color='red', size=10, alpha=0.8)
plot2 = figure()
output_file('First_try.html')
show(plot1)
How can I give a range in ColumnDataSource?



