from
bokeh.plotting
import
figure, output_file, show
output_file(
"gfg.html"
)
graph
=
figure(title
=
"Bokeh Hexagon Tiles Graph"
,
match_aspect
=
True
)
graph.xaxis.axis_label
=
"x-axis"
graph.yaxis.axis_label
=
"y-axis"
r
=
[
0
,
-
1
,
0
,
1
,
-
1
,
0
,
1
]
q
=
[
0
,
0
,
-
1
,
-
1
,
1
,
1
,
0
]
fill_color
=
[
"yellow"
,
"blue"
,
"pink"
,
"green"
,
"orange"
,
"red"
,
"purple"
]
line_color
=
[
"yellow"
,
"blue"
,
"pink"
,
"green"
,
"orange"
,
"red"
,
"purple"
]
graph.hex_tile(r, q,
fill_color
=
fill_color,
line_color
=
line_color)
show(graph)