Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bokeh.plotting import figure, curdoc
- from bokeh.models.widgets import Panel, Tabs
- from bokeh.client import push_session
- import numpy as np
- tabs = []
- x = np.linspace(-2*np.pi, 2*np.pi, 200)
- colour_list = [(51, 153, 51) ,(153, 51, 51), (51, 51, 153), (153, 51,153 ), (153, 51, 51)]
- y = np.sin(x)
- w = np.cos(x)
- z = np.arcsin(x)
- u = np.arccos(x)
- v = np.arctan(x)
- r = np.tan(x)
- list_of_axis = [(y,w), (z, u), (v,r)]
- for two in list_of_axis:
- figure_obj = figure(plot_width = 1000, plot_height = 800)
- figure_obj.line(x, two[0], line_width = 2, line_color = colour_list[3])
- figure_obj.line(x, two[1], line_width = 2, line_color = colour_list[1])
- tabs.append(Panel(child = figure_obj, title = "two by two"))
- tabs = Tabs(tabs = tabs)
- session = push_session(curdoc(), url = "http://localhost:1027")
- session.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement