# importing the modules
from bokeh.plotting import figure, output_file, show
from bokeh.palettes import Magma, Inferno, Plasma, Viridis, Cividis
# file to save the model
output_file("gfg.html")
# instantiating the figure object
graph = figure(title = "Bokeh Palettes")
# demonstrating the Magma palette
graph.vbar(x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
top = [9] * 11,
bottom = [8] * 11,
width = 1,
color = Magma[11])
# demonstrating the Inferno palette
graph.vbar(x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
top = [7] * 11,
bottom = [6] * 11,
width = 1,
color = Inferno[11])
# demonstrating the Plasma palette
graph.vbar(x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
top = [5] * 11,
bottom = [4] * 11,
width = 1,
color = Plasma[11])
# demonstrating the Viridis palette
graph.vbar(x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
top = [3] * 11,
bottom = [2] * 11,
width = 1,
color = Viridis[11])
# demonstrating the Cividis palette
graph.vbar(x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
top = [1] * 11,
width = 1,
color = Cividis[11])
# displaying the model
show(graph)